13-06-22 10:14 AM
Hello ALL,
We have few APIs need to authinticate via Ouath2 ,
I have set all the parameter ,client id , secret.....etc,
BP always genrate worng token when i try it on Postman!
If i do same request in post man it works perfictly same parameters!
is this happend to anyone ? any ideas?
------------------------------
Hazem Farajallah
RPA-developer
e-on
Europe/Malmo
------------------------------
13-06-22 11:39 AM
13-06-22 12:34 PM
13-06-22 12:50 PM
13-06-22 05:38 PM
14-06-22 08:45 AM
Hello Thanks for answering,
I have done it as below i got this error msg now "Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 400
HTTP Response Content: {"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'grant_type'.\r\nTrace ID: 1efa6a7a-ac67-49fa-97a1-a1d0d4290e00\r\nCorrelation ID: 437de48a-2543-461f-ae2f-0abdadbaab12\r\nTimestamp: 2022-06-14 07:41:29Z","error_codes":[900144],"timestamp":"2022-06-14 07:41:29Z","trace_id":"1efa6a7a-ac67-49fa-97a1-a1d0d4290e00","correlation_id":"437de48a-2543-461f-ae2f-0abdadbaab12","error_uri":"https://login.microsoftonline.com/error?code=900144"}
"
I set the header for applciation/x-www-form-urlencoded and the request body"grant_type=client_credentials&client_id=[XXXXX]&client_secret=[XXXXX]&resource=https://api.prod.digitalchargingsolutions.com/b2bgateway "
14-06-22 02:55 PM
15-06-22 08:04 AM
@Shashank Kumar this should be Ouath2 to return a token for other API,s So up i set it to none so i can retrive the token and send it from the process to the other web API.
I have done that before but it was not Oauth2.
24-06-22 07:14 AM
21-07-22 11:43 AM
Hi Meng,
The format is just raw text and you would not have any quotation marks when posting the body using x-www-form-urlencoded.
Conversion would be for 1 line of the tradeReqJson
accountName=XXXX&securityID=xxxxxxx&securityFilingVal=xxxxxx&accountFilingVal=xxxx&ruleID=xxxxx,processIdentifier=N&toDateStr=xxxxx
I am unsure how you would send an array of more than one line with urlencoded, you will also need to ensure that all the headers are correct using the thread above and the other thread mentioned.
Best Regards,