08-08-25 02:10 PM - edited 08-08-25 02:12 PM
Hi, everyone! I need help setting up an API request in Blue Prism.
Due to LGPD laws I can't fully disclosure all the parameters, but I'm gonna show them as variables here. I have a post request with the following endpoint:
[base_url]/api/oauth/token
There are no parameters needed to the request. The headers that I used are 'Content-Type = application/x-www-form-urlencoded' and 'Accept = */*'. The authentication must be set to basic, in which I created a credential in the credentials vault of Blue Prism and I'm passing them through the Common Authentication area of the Web API. The body has the type 'x-www-form-urlencoded' and a pair of key values 'grant_type=client_credentials'. Images attached to show the configuration.
However, everytime I try to run the request from a process, I get the error:
HTTP Status Code: 500
HTTP Response Content: <html><body><H2>Internal Server Error</H2></body></html>
Can someone show me what I'm doing wrong.
10-08-25 02:45 PM
Dear @gu.toledo
Could you please try the below approach using Utility HTTP
Headers: Create the collection , add row and add the API Key
API Token Example: Basic AA62387645hfhbfgybuy775956
Check the output response and status as 200
After the Request:
If StatusCode = 200, parse the JSON response for access_token.
If StatusCode = 500, it usually means one of the following: