Call a APIGEE API from SAP using Oauth token

I have created an API in APIGEE which requires an OAuth token. It is working fine from Postman. I want to call the same API from SAP backend. Can you please provide the steps on what to config in SAP or how to consume in SAP

0 1 352
1 REPLY 1

In postman, you have some way to obtain a token. Then you use that token to invoke the API.

You need to do the same thing in the SAP backend.

I don't know your SAP backend, but ... it seems you will need

  • Some way to store a client ID and secret. a persistent store?
  • some way to store tokens, and lookup tokens. A cache?
  • a way to make a POST call to the /token endpoint to obtain a new token

The logic in the SAP backend acting as a client will be:

  1. check cache for an existing token. if present, use it, and continue to step 4
  2. retrieve the client ID and secret from the persistent store, and with that information, POST to the /token endpoint
  3. store the retrieved token into the cache
  4. with the current token, invoke the API endpoint