Hello everyone, I'm just new to this giant world of OutSystems, I have a question, I'm trying to consume an Intuit Web Service but Basic Authentication is requested on the Header, I've seen other examples here on the forum but it doesn't work, does anyone who has gone through something like this in the Reactive version? 1 - Using examples on this forum like setting the Basic Auth like this https://www.outsystems.com/forums/discussion/57190/set-rest-api-basic-authentication-on-header-outsystems-11/
Or this
https://www.outsystems.com/forums/discussion/22162/set-rest-api-basic-authentication/
I tried doesn t work, on Postman is ok but only accept with the ClientId an Secret of the App
Thank you for your time and the Best Regards :)
You can set the basich authentication of a consumed REST service just by adding User and Password in the Integration tab of the service center. This will create the header for you.
The other option is to use the AddHeader in the HTTPHandler reference and add the header yourself:
- Create the OnRequest action in the REST Service.
- Make sure the header is namend "Authorization", The value is BASIC and then a Base64 string of your user and password with a : in between.
I read you also have a Client id and secret, which are not basic authentication. For those you need other headers. You can add the header you see in Postmen the same way as explained before.
Hello, thank you very much for the help and explanation, yes I found it strange but on Postman only accepts passing the clientid and secret in Basic Authorization, is there another header to send these values without being in Basic?Thank You again and Regards
check the Raw request and response in Postmen and you can see which headers are used.
It was weird but I put ClientId and Secret in Basic Authentication of Rest API and didn't put anything in Request because it was already automatically in the Header and everything worked out, thank you for the help Stefano :)
I am glad you made it work.