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

    List members of a group channel

    Retrieves a list of members of a group channel.

    Note: See this page to learn more about channel types.


    HTTP request

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

    Parameters

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    channel_url

    string

    Specifies the URL of the channel.

    OptionalTypeDescription

    token

    string

    Specifies a page token that indicates the starting index of a chunk of results to retrieve. If not specified, the index is set as 0.

    limit

    int

    Specifies the number of results to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

    show_delivery_receipt

    boolean

    Determines whether to include information about the delivery receipt of each member of the channel in the response. The delivery receipt indicates the timestamp of when each member has last received messages from the Sendbird server in the channel, in Unix milliseconds. (Default: false)

    show_read_receipt

    boolean

    Determines whether to include information about the read receipt of each member of the channel in the response. The read receipt indicates the timestamp of when each member has last read messages in the channel, in Unix milliseconds. (Default: false)

    show_member_is_muted

    boolean

    Determines whether to include information about the mute status of each member. (Default: false)

    order

    string

    Specifies the method to sort a list of results. Acceptable values are the following:
    - member_nickname_alphabetical (default): sorts by the member nicknames in alphabetical order.
    - operator_then_member_alphabetical: sorts by the operational role and member nickname in alphabetical order where channel operators are listed before channel members.

    operator_filter

    string

    Restricts the search scope to only retrieve operators or non-operator members of the channel. Acceptable values are the following:
    - all (default): no filter is applied to the list.
    - operator: only channel operators are retrieved.
    - nonoperator: all channel members, except channel operators, are retrieved.

    member_state_filter

    string

    Restricts the search scope to retrieve members based on if they have accepted an invitation or if they were invited by a friend. Acceptable values are invited_only, joined_only, invited_by_friend, invited_by_non_friend, and all. (Default: all)

    muted_member_filter

    string

    Restricts the search scope to retrieve members who are muted or unmuted in the channel. Acceptable values are all, muted, and unmuted. (Default: all)

    nickname_startswith

    string

    Searches for members whose nicknames start with the specified value. Urlencoding the value is recommended.

    ?limit=4&show_delivery_receipt=true&show_read_receipt=true&show_member_is_muted=true&operator_filter=all
    

    Response

    If successful, this action returns a list of user resources registered as channel members in the response body.

    {
        "members": [
            {
                "user_id": "Aiden",
                "nickname": "Doctor",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_54_512px.png",
                "is_active": true,
                "is_online": false,
                "is_muted": false,
                "state": "joined",
                "role": "operator",             // Either operator or null. The value of null indicates that this user is a normal channel member.
                "delivered_ts": 1542762336581,  // The delivery receipt of this member
                "read_ts": 1542762334452,       // The read receipt of this member
                "last_seen_at": 1542762334452,
                "metadata": {
                    "location": "Columbus",
                    "marriage": "Y"
                }
            },
            ... # More members
        ],
        "next": "pNsRScFRrZaIEERRx1RcE2d0FUZSUlkJFVQRHB86AkAgNn8eAERrDEGNFX11fUlsEfEAf"
    }
    

    List of response properties

    Property nameTypeDescription

    members[]

    array of objects

    An array of user objects that are channel members.

    next

    string

    The value for the token parameter to retrieve the next page in the result.

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