cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Destination failure for Resource Consumption API of SAP API Business Hub

MMonis
Explorer
1,076

Hi,

I am trying to connect to the Resource Consumption API of the API Business Hub from my custom CAP application. I am using the Destination service and the Usage data management (uas) service for this purpose.

I have created a destination of type OAuth2Password based on the clientid, client secret, url details from the service key of the Usage data management (uas) service instance.

However when I test the destination connection, it throws a 401 Unauthorized error.

If I use the same clientid, client secret and url through a terminal using the curl command as documented in Configuration for Using the Resource Consumption APIs in the SAP API Business Hub:

I successfully get in return an access token. If I then use this access token as bearer token in postman to query the Resource Consumption API, I get a successful response.

Can someone provide some guidance in how to get the destination to work, so my CAP app could use this destination to fetch the info from the API ?

Regards,

Melwyn

Accepted Solutions (0)

Answers (0)