Token Creation & Token Management
In this step as per OAuth protocol, the code received by the client in the authorization step will be exchanged to get the access_token which is used for accessing the Xoxoday storefront granted based on the scopes allowed by the user.
Access Token Generation
The client server (As this request involves sensitive information i.e, client_secret) must make the following POST request to get the access_token.
Parameters
Parameters
Body Parameters
Body Parameters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Diagrammatic Representation for Authorization & Access Token generation.
Access Token generation from Refresh Token
Upon Expiry the access token can be regenrated using the response token using the following request:
Parameters
Parameters
Body Parameters
Body Parameters
|
|
|
|
|
|
|
|
|
|
Note In the above response refresh_token is newly generated again. So the client-server must replace the old refresh token with this new refresh token.
While the expiry is 30 days for the access_token and 60 days for the refresh_token, Xoxoday recommends polling the Access Token generation from Refresh Token API on every 4xx error to ensure no downtime in case of a token invalidation before the 30-day expiry.
Diagrammatic Representation for Access Token regeneration.
Access Token Validation
For verifying at any point in the app if the token is valid/not, call below endpoint.
Last updated