on 2023 Jan 19 3:42 PM
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
Request clarification before answering.
User | Count |
---|---|
30 | |
22 | |
16 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.