Generate a secondary API token
You can generate a new secondary API token using this API. A master API token and a secondary API token give you much of the same access to the Chat API's functionalities. The only difference is that you need the master API token to list, generate, or revoke tokens.
We recommend that you use secondary API tokens when making API calls since the master API token may accidentally revoke secondary tokens and prevent your API calls from working properly.
Note: You can have up to 11 API tokens consisting of one master API token and ten secondary API tokens.
To generate a new secondary API token, follow the steps below.
-
Enter your master API token in the
Api-Token
of the request header. -
Include an empty JSON object in the request body.
HTTP request
Response
If successful, this action returns information about the newly generated secondary API token in the response body.
In the case of an error, an error object is returned. A detailed list of error codes is available here.