cancel
Showing results for 
Search instead for 
Did you mean: 

Validate access token in SAP Ariba API

0 Kudos
405

Hi,

Can anyone point me, How to validate access token when working with SAP Ariba APIs?

There is API to generate access token and refesh token but I didnt see any to validate one.

Regards,

Amit Gawali

cc: ajmaradiaga

Accepted Solutions (1)

Accepted Solutions (1)

ajmaradiaga
Developer Advocate
Developer Advocate

Hi amit_gawali,

There is no separate method to validate an access token against the OAuth server. The only way to "validate" the access token is by calling the API that your credentials have access to.

Remember that you created an application in the developer portal and requested access to an API. The credentials for that application will only have access to the API that you requested access for. So, once you get an access token, that access token can be used to call the API. To "validate", just call a method of the API that your application has access.

For example, if your application has access to the Supplier Data with Pagination API, call the /vendorDataRequests method.

0 Kudos

Thanks ajmaradiaga . Also Can you tell me, for how much duration refresh token is valid? like access token have validity of 24 minutes.

ajmaradiaga
Developer Advocate
Developer Advocate
0 Kudos

Hi amit_gawali, as far as I know, there is no time expiry for the refresh token - https://help.sap.com/viewer/b61dd8c7e22c4fe489f191f66b4c48d6/cloud/en-US/51a7e3fc0cd44df48cb48f4fd23.... One thing to note is that after getting an access token by means of using the refresh token, the response will include a new refresh token and you will need to store and use the new refresh token the next time you want a new access token.

PS: If you consider that the answer above has solved your query, please mark the question as answered.

Thanks,

.A

Answers (0)