/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    Generate a secondary API token

    Copy link

    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.

    1. Enter your master API token in the Api-Token of the request header.

    2. Include an empty JSON object in the request body.

    HTTP request

    Copy link
    POST https://api-{application_id}.sendbird.com/v3/applications/api_tokens


    Copy link

    If successful, this action returns information about the newly generated secondary API token in the response body.

        "token": "b3d79100dedf80cf4afdf3de5385b64c3be8cf71",
        "created_at": 1596607063

    In the case of an error, an error object is returned. A detailed list of error codes is available here.