post https://api.zenoti.com/v1/tokens
Purpose: The purpose of this API is to generate a new access token for the authentication of the user. Businesses can use this token to access Zenoti APIs.
Note: The access token is valid only for 24 hours, post which you must generate a new token by invoking the Refresh an access token API.
Response Parameters
After you invoke the Generate an access token API, you will see the following parameters appear under the Credentials object.
Name | Type | Description |
---|---|---|
access_token | id | This is the access token that is generated when you invoke the API - Generate an access token. Use this token to access the Zenoti APIs. |
access_token_expiry | date time | This is the validity period of the access token. The access token is valid for 24 hours from the date and time of generation. |
refresh_token | id | If an access token is expired, use the refresh token to generate a new access token. Note: If you use the refresh token before the expiry of the access token, it will become redundant and cannot be used for authentication. |
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". |