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

    Get total number of messages in a channel

    Retrieves the total number of messages in a specific channel.


    HTTP request

    GET https://api-{application_id}.sendbird.com/v3/{channel_type}/{channel_url}/messages/total_count
    

    Parameters

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    channel_type

    string

    Specifies the type of the channel. Acceptable values are open_channels and group_channels.

    channel_url

    string

    Specifies the URL of the target channel.


    Response

    If successful, this action returns the total number of messages in the channel in the response body.

    {
        "total": 293
    }
    
    Property nameTypeDescription

    total

    int

    The total count of messages in the channel.

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