cancel
Showing results for 
Search instead for 
Did you mean: 

x-www-form-urlencoded API request problem

gu.toledo
Verified Partner

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.

 

gutoledo_3-1754658398658.png

gutoledo_4-1754658451205.png

gutoledo_5-1754658508922.png

gutoledo_6-1754658566801.png

gutoledo_7-1754658598719.png

 



1 REPLY 1

faheemsd
MVP

Dear @gu.toledo 

Could you please try the below approach using Utility HTTP

faheemsd_0-1754832818978.png

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:

  • Malformed headers
  • Missing or incorrect credentials
  • Incorrect body format
  • The endpoint is not expecting a Basic auth or can't process the request format

RPA Lead