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

    View number of unread messages per member

    Retrieves the total number of each member's unread messages in a specific group channel. This action is only applicable for users in a group channel.


    HTTP request

    GET https://api-{application_id}.sendbird.com/v3/group_channels/{channel_url}/messages/unread_count
    

    Parameters

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    channel_url

    string

    Specifies the URL of the target channel.

    user_ids

    string

    Specifies a comma-separated string of one or more IDs of the target users. Urlencoding each user ID is recommended (for example, ?user_ids=urlencoded_id_1,urlencoded_id_2).

    ?user_ids=Jeremy,Matthew
    

    Response

    If successful, this action returns the number of unread messages by channel members in the response body.

    {
        "unread": {
            "Jeremy": 6,
            "Matthew": 4
        }
    }
    
    Property nameTypeDescription

    unread

    object

    An object of key-value items. The key indicates the channel member's user ID and the value indicates the count of the member's unread messages in the channel.

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