My requirement is to consume an odata service in Outsystems.
What error did i face?
Can anyone suggest me what I need to do in order to fetch the response.
Hi Ram,
Given that error, I would expect you are missing some header parameter for authentication. "SPNego" is an ancient protocol for negotiating security protocols, and not used by modern browsers.
Hello Kilian,
Thank you for your response. I am connecting with an SAP S/4 HANA system, trying to consume the odata service. I tried with Basic Auth but couldn't receive any response. Could you please elaborate what other information i could enter in authorisation to achieve the desired result
That should be in the API documentation for SAP, right? I have no knowledge of SAP HANA, but if it provides an API, the API documentation should give you all the details.
Hi ram,
401 unauthorized error will be due to cookies check you are passing cookie or not if you pass cookie value it will be work fine.
For confirmation you also check on postman as well.
Hope this will solve your issue.
Thanks and regards,
Akshay Deshpande.
401 just means you don't pass the right authorization, I don't think cookies have anything to do with it.
Hello killan,
Actual I had also face this issue and that is solved using cookie because they were give authorization using cookie.
I had solved that issue using cookie that's y I have suggested same to him
And somewhere in header part cookie also need as per my scenario.
I guess that depends on the authentication mechanism. Could as well use basic authentication, or bearer authentication, etc.
Yes right.
Hello Akshay,
Thank you for your response. I am not sure i understood how to check the cookies is available in the header. could you please tell me in more detail how to add?
Thanks,
Ram
You need to understand what kind of authorization the REST API is requesting. It seems you don't know that, but it is absolutely very important to figure it out!
Hello ram
Actual I would like to suggest you that you will hit that API in the postman so from that you will get header,cookie all the part because in the postman it is automatically set so first check on the postman if it's working then pass same parameters in the outsystems as well
Thanks and Regards,
Just add the field Authorization in the Header , does needs to have a value