Chat / Platform API
Current version: v3
    Chat Platform API v3
    Chat Platform API
    Chat
    Platform API
    Home
    /
    Chat
    /
    Platform API
    /
    Channel

    Join a channel

    This API allows a user to join a public group channel. Users can only join public group channels where the is_public property is set to true using this API. A single user can join up to 2,000 group channels, and a user who reaches the capacity can’t join a new channel. See this page to learn more about channel types.


    HTTP request

    PUT https://api-{application_id}.sendbird.com/v3/group_channels/{channel_url}/join
    

    Parameters

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    channel_url

    string

    Specifies the URL of a channel.


    Request body

    The following table lists the properties of an HTTP request that this action supports.

    Properties
    RequiredTypeDescription

    user_id

    string

    Specifies the unique ID of a user.

    OptionalTypeDescription

    access_code

    string

    This parameter can only be used when the channel operator creates a public group channel. If the channel operator uses an access code for the corresponding type of channel, users will be required to enter the access code to join the channel. If specified, the is_access_code_required property of the channel resource is automatically set to true.


    Responses

    If successful, this action returns an empty response body.

    Error

    In the case of an error, an error object like below is returned. See the error codes section for more details.

    {
        "message": "Not authorized. \"Can't join to non-public channel.\".",
        "code": 400108,
        "error": true
    }