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

    View number of channels by join status

    Retrieves the number of group channels a user joined by join status.


    HTTP request

    GET https://api-{application_id}.sendbird.com/v3/users/{user_id}/group_channel_count
    

    Parameters

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    user_id

    string

    Specifies the unique ID of a user.

    OptionalTypeDescription

    custom_types

    string

    Specifies a comma-separated string of one or more custom types to filter the group channels with the corresponding types, to retrieve the number of the user's group channels by join status in the filtered channels.

    hidden_mode

    string

    Restricts the search scope to group channels that match a specific hidden_status and operating behavior. Acceptable values are the following:
    - unhidden_only (default): Specifies channels which the user joined with the unhidden status.
    - hidden_only: Specifies all channels which the user joined with either the hidden_allow_auto_unhide or hidden_prevent_auto_unhide status.
    - hidden_allow_auto_unhide: Specifies channels which the user joined with the hidden_allow_auto_unhide status.
    - hidden_prevent_auto_unhide: Specifies channels which the user joined with the hidden_prevent_auto_unhide status.


    Request body

    The following table lists the properties of an HTTP request that this action supports.

    Optional
    Property nameTypeDescription

    state

    string

    Determines which join status to use to filter the user's group channels and count the total number. Valid values are the following:
    - joined: Indicates the number count of the user’s joined channels.
    - invited: Indicates the number count of channels which the user has been invited to but not joined.
    - invited_by_friend: Indicates the number count of invited channels by the user’s friends but not joined.
    - invited_by_non_friend: Indicates the number count of invited channels by non-friends but not joined.


    Response

    If successful, this action returns the number of the group channels by the user's join status in the response body.

    {
        "group_channel_count": 31
    }
    

    List of response properties

    Property nameTypeDescription

    group_channel_count

    long

    The number of the user's group channels by join status.

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