post https://api.zenoti.com/v1/tokens#
Purpose: Use this API to refresh an expired access token. Since an access token is valid for 24 hours, you must use this API to generate a new access token.
Things to remember:
- A newly generated refresh token is valid for 90 days (3 months). It will expire after this period.
- A refresh token can only be used once.
Caution: Invoking this API will deactivate the existing access tokens and generate a new access token. So use the Refresh an access token API only when an access token is about to expire or has already expired.
Note: Remove the hash (#) at the end, when using this API.
Response Parameters
You will see the following parameters appear under the Credentials object.
Name | Type | Description |
---|---|---|
access_token | id | This is the new access token that is generated. |
access_token_expiry | date time | This is the validity period of the newly generated access token. The validity of the new token is 24 hours. |
refresh_token | id | After you've used your existing refresh token, it becomes invalid. A new refresh token is generated along with the access token. The validity of this new refresh token is 90 days or 3 months. |
refresh_token_expiry | date time | This is the expiry of the refresh token. |
token_type | string | This is the type of authentication the token provides. |
token_id | guid | Unique identifier of the token. |
app_id | guid | Unique identifier of the application. |
user_type | string | This specifies the user who is accessing the APIs. It is either "Guest" or "Employee". |