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

    List members of a group channel

    Copy link

    Retrieves a list of members of a group channel.

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


    HTTP request

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

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    channel_url

    string

    Specifies the URL of the channel.

    OptionalTypeDescription

    user_id

    string

    Specifies the unique ID of a user. If user_id is provided, the response will include two additional boolean properties about each user in the members list.
    -is_blocking_me: Indicates whether the listed user is blocking the user specified in the user_id parameter.
    -is_blocked_by_me: Indicates whether the listed user is blocked by the user specified in the user_id parameter.

    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

    Copy link

    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,
                "is_blocked_by_me": false,      // Only included if user_id is specified as a parameter.
                "is_blocking_me": false,        // Only included if user_id is specified as a parameter.
                "metadata": {
                    "font_preference": "times new roman",
                    "font_color": "black"
                }
            },
            ... # More members
        ],
        "next": "pNsRScFRrZaIEERRx1RcE2d0FUZSUlkJFVQRHB86AkAgNn8eAERrDEGNFX11fUlsEfEAf"
    }
    

    List of response properties

    Copy link
    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.