‎2018 Oct 17 6:15 PM
Hello Team,
We are trying to make a HTTP call from ABAP using cl_http_client.
We are able to get the response JSON from a test API with status code 200 when we are passing client id and client secret values in GET request headers.
But, when we are passing access token in GET request headers which is obtained by OAuth token server which is mandatory for the original API, we are not receiving the response and program is returning Communication failure exception with HTTP Status 500 - connection broken.
API team confirmed that they are able to successfully get request from SAP and API is sending the correct response JSON with HTTP status 200 from their end.
We are not able to understand how to crack the issue with our connection.
Could you help us here?
Our requirement is to consume the REST APIs with OAuth authentication in SAP BW/HANA.
Many thanks in advance.
‎2018 Oct 22 4:20 PM
This issue is now resolved.
The issue is with the API headers; header in the API used for sending Access token is a custom header ('access_token: <Token value>') which caused few security patterns to fail according to API Gatway (Mulesoft) policies.
When API team changed it to header 'Authorization: Bearer <Token value>', It worked fine.
Thanks.
‎2018 Oct 18 1:05 PM
So I searched on your requirement:
REST APIs with OAuth authentication in SAP BW/HANA.
I'm assuming you are on HANA. This blog has a lot of detail, and it is a series. If you can't find anything come back here and give your system, and a screen shot of what you are looking at that causes the issue.
‎2018 Oct 22 4:20 PM
This issue is now resolved.
The issue is with the API headers; header in the API used for sending Access token is a custom header ('access_token: <Token value>') which caused few security patterns to fail according to API Gatway (Mulesoft) policies.
When API team changed it to header 'Authorization: Bearer <Token value>', It worked fine.
Thanks.