Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HTTP 500 Connection broken while making HTTP request in ABAP

sucheno
Participant
0 Likes
9,257

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.

1 ACCEPTED SOLUTION
Read only

sucheno
Participant
4,574

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.

2 REPLIES 2
Read only

mmcisme1
Active Contributor
4,574

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.

Read only

sucheno
Participant
4,575

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.