cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CALM API returns forbidden / 403 (in postman)

friscas
Explorer
0 Kudos
267

Hi everyone, 

I am testing or calm API instance service on postman, but I sadly get a 403 after successfully fetching the correct access_token

.

When creating the service, I have also added the correct scopes like described here: https://help.sap.com/docs/cloud-alm/apis/managing-scopes

What I do in postman:

  1. Fetch auth token from the API auth given by the service key (...authentication.eu20.hana.ondemand.com/oauth/token)
  2. copy access_token from the successful response and add it as a Bearer token and hit request to https://{region}.alm.cloud.sap/api/calm-projects/v1/projects
  3. response is forbidden with status code 403

I would really appreciate your help, thank you.

 

View Entire Topic
friscas
Explorer
0 Kudos

HI @john_p_grimes ,

i have solved the issue with the amazing CALM customer support and the issue had to do with the grant type, i have set it to password but since it is a OAuth2 client credentials, the grant type should be grant_type=client_credentials.

 

So in the url path there should be a query param, like the following:

https://{tenantid}.authentication.{region}.hana.ondemand.com/oauth/token?grant_type=client_credentials