Questions, suggestions and discussion around ProcessMaker 3 documentation
#793482
I need to know the how to access a rest api without login into processmaker. And i have consume the REST API (grant_type as "authendication_code" and etc) in processmaker. when the accesstoken expires it redirect to the login screen?

how solve this problem ?
Last edited by jemiris on Tue Aug 13, 2019 3:14 am, edited 1 time in total.
#793491
If you go to an address like:
http://example.com/workflow/oauth2/auth ... IOJ&scope=*
(replace with your host name, workspace and client_id)
Then, you will be redirected to the login screen.
After logging in, then you will redirected to an address like:
http://localhost:320/workflow/oauth2/au ... IOJ&scope=*
where you can Accept or Reject the authorization to access your PM account through REST.
RESTLogin.png
RESTLogin.png (50.11 KiB) Viewed 10059 times
If the user clicks on Accept, then the web brower will be redirected to the callback URL that you set in the configuration of your REST application.
That callback URL should be a script to obtain an access token that can be used in subsequent REST requests.

If you didn't set a callback URL in the configuration of your REST application, then you will see this message on your screen:
Code: Select all
{"error":"invalid_uri","error_description":"No redirect URI was supplied or stored"} 
#793493
There is no automatic redirection to the login screen when the login session expires. Your script needs to check for errors that are returned by the REST endpoints. I forget the exact error message, but after 24 minutes of inactivity you will see it. There is a protocol in REST to get a new access token, but I find it easier to just have your script redirect the web browser to:
http://{host}/{workspace}/oauth2/authorize?response_type=code&client_id={client_ID}&scope=*
and have the user do the login over again.

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]