on 02-21-2024 9:45 AM
Hi there,
I want to call a "Pull API" in SAP Cloud ALM, f. ex. the REST Data Interface "List of Data Providers". How can I send the OAuth-"access_token" with my HTTPS request to access the SAP Cloud ALM API resource endpoint?
I tried passing the "access_token" in the header of the request with key "authorizations", but that fails with error "401 Unauthorized". I tried again passing the "access_token" value with the key "APIKey" in the header of the request, but it failed with the same error. No matter what I try, I get always the "401 Unauthorized" error.
FYI: I updated the scope in our Service Instance “eh-cloudalm-api-instance” like the Sample Code example.
I also checked these:
There are at several causes for this issue. The causes and their resolutions are fully documented in KBA 3435224.
Based on your description, it sounds like there are at least 2 factors impacting the error:
Make sure that your REST API client app (Postman, etc.) has an option to add "Auth"/"Authorization" parameters to the Request. The type must be set to the correct type for the "access_token" value ("OAuth", "Bearer", "Bearer Token" etc.). Please refer to the documentation for your REST API client app (Postman, etc.) for instructions on how to properly pass OAuth Bearer tokens to requests.
The API Key can be taken either from the "Try Out" page on the SAP Business Accelerator Hub. The key "APIKey" must be passed in the header of the request with the value of the API Key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.