Skip to main content

Create chatroom token

POST 

/bv/chatroom/v1/chatrooms/:id/tokens

Generates a chatroom token required to access and manage chatroom-related APIs.

Request

Path Parameters

    id stringrequired

    Required. The uuid of the chatroom that was target to create the token.

Body

required
    role string

    Possible values: [ROLE_GUEST, ROLE_VIEWER, ROLE_ADMIN]

    Optional. The role of the token to used. Default will use ROLE_GUEST if not provided.

    device_id string

    Optional. The device identifier of the token to be used. Default will generate an UUID string if not provided.

    subject string

    Optional. The user identifier of then token to be used. Default will generate a guest UUID string if not provided.

    name string

    Optional. The user name of the token to be used. Default will use "Admin" or "Guest" according to the given role if the field was not provided.

Responses

A successful response.

Schema
    token string

    The chatroom token is used while connecting to the chatroom, also the token is needed when invoking chatroom APIs.

    expires_in int32

    Indicates the lifetime in seconds of the token.

    refresh_token string

    The refresh token is used to refresh the token when it's expired.

    refresh_expires_in int32

    Indicates the lifetime in seconds of the refresh_token.

Loading...