Skip to main content

Generate a new Chat Token

POST 

/tokens

Generate a Chat Token to be used to authenticate clients to the Chat Service.

Permissions

The API token must include the following scopes: Chat.

Request

Body

required

    ttl integerrequired

    Possible values: >= 1 and <= 43200

    The maximum time, in minutes, that the access token will be valid for. Between 1 and 43,200 (30 days).

    channels

    object

    required

    User-defined channel names. Each channel is a object with read and write properties. Max of 500 channels inside main channels. Either read, write, or both are required inside each channel and default to false. Each channel name can be up to 250 characters. Must be valid JSON.

    property name*

    object

    read booleanrequired

    Gives the token read access to the channel.

    write booleanrequired

    Gives the token write access to the channel.

    member_id string

    The unique identifier of the member. Up to 250 characters. If not specified, a random UUID will be generated.

    state object

    An arbitrary JSON object available to store stateful application information in. Must be valid JSON and have a maximum size of 2,000 characters.

Responses

The request has succeeded and a new resource has been created as a result.

Schema

    token stringrequired

    The generated Chat Token.

Loading...