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

    Get total number of messages in a channel

    Copy link

    Retrieves the total number of messages in a specific channel.


    HTTP request

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

    Parameters

    Copy link

    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

    Copy link

    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.