Inspired by the guide by Francisco Freire :https://www.outsystems.com/forums/discussion/36143/guide-consume-rest-api-with-xml-request/
I want to share how to consume REST API with Form URL Encoded Request.
First off, you need a POST http method and set Request Format to Form URL Encoded.
Then, use this in Request Body:
You don't need to set Content-Type, it has been handled by Outsystems.
Hope it helps.
This is great Harlin. Thanks :)
Hi
greetings. I am also integrating with a urlencoded api. my question is when outsystems create the input parameters that you added in the Request box, what should be the value in the Advanced.SendIn portion of that input parameter? Body or URL?
thanks.
Body.
Harlin Setiadarma wrote:
thanks
Thank you Harlin.
Hi,
in my client secret, it contains =.
Client Secret = xxxxxxxxxxxxxxxxxxxxxxxxxx=
client secret is ending with =, so if I use this format. Its not working
Client_Secret=xxxxxxxxxxxxxxxxxxxxxxxxxx=&Client_Id=xxxxxx
This showing invalid Client Secret. Kindly help me in this.
Try changing your password and replace that character with a regular character
Hi all
How to pass grant_type={grant_type}&....... using input parameter into request body. Am consuming one of token api and set Request Format to Form URL Encoded with POST http method. When i finish consuming api am getting number of input parameters and am passing value into all input parameters which is pass while test and into postman as well.
When i test api into outsystems and with postman it works and give me proper response but when call it into my action it gives me error 400 Bad reuest.
Were you able to fix this, as I am running into this issue @Apoorv Choubey
I'm encountering the same issue. Were you able to resolve? I have my request configured exactly like yours and am getting a 400 when invoked.
@Nick Swaine in URL Path is there a special character?
Like this: /v1/places:autocompleteYou can test is successfully inside Service Studio, then it would give you 404 error in runtime.
If you enable full logging, you will see that at runtime, Outsystems encoded it to /v1/places%3Aautocomplete.
This will cause 404 error.
To solve it you must use OnBeforeRequest to alter URL Path to the correct one.
This is Outsystems old bug that never been fixed, you might help community by reporting it using Support Ticket. More voices will be heard more louder.
Hope this helps....