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

    List channels where a user is muted

    Copy link

    Retrieves a list of open and group channels where a user is muted. The response contains information about the channels, such as channel_url and custom_type.


    HTTP request

    Copy link
    GET https://api-{application_id}.sendbird.com/v3/users/{user_id}/mute
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    user_id

    string

    Specifies the unique ID of the muted user.

    OptionalTypeDescription

    token

    string

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

    limit

    int

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

    ?token=RNTNeFRFFBrAEQBXRPNEQAp3F2rER~~&limit=3
    

    Response

    Copy link

    If successful, this action returns a list of muted channel resources in the response body.

    {
        "muted_channels": [
            {
                "remaining_duration": -1,
                "end_at": -1,
                "description": "Racism",
                "name": "Talking about 2018 midterm election",
                "custom_type": "politics",
                "channel_url": "sendbird_open_channel_11694_61f545ddc85549592737afafe4bc2ec0d7ba92a0",
                "created_at": 1543688557,
                "cover_url": "https://sendbird.com/main/img/cover/cover_05.jpg",
                "data": ""
            },
            {
                "remaining_duration": 21435000,
                "end_at": 1542722823000,
                "description": "insult",
                "name": "Golden State Warriors fans",
                "custom_type": "sports",
                "channel_url": "sendbird_group_channel_11694_f94eba708909d33c34cb37b043838ecce07afc04",
                "created_at": 1523606460,
                "cover_url": "https://sendbird.com/main/img/cover/cover_06.jpg",
                "data": ""
            }
        ],
        "next": "DR23qrsYrFRADf2IEUYXX1Rcs3A0FUZSUlkJFVQRHB86AkAgNn8e34DF31NFX11fUl34"
    }
    

    List of response properties

    Copy link
    Property nameTypeDescription

    muted_channels[]

    array of objects

    An array of JSON objects that contain information on the open channels and group channels where the user is muted.

    (muted_channels).remaining_duration

    long

    The time left in Unix milliseconds until the user becomes unmuted or the time specified in end_at. A value of -1 indicates that the mute is permanent. (Default: -1)

    (muted_channels).end_at

    long

    The time in Unix milliseconds when the user becomes unmuted in the channel. A value of -1 indicates that the mute is permanent. (Default: -1)

    (muted_channels).description

    string

    The reason for mute.

    (muted_channels).name

    string

    The topic or name of the channel.

    (muted_channels).custom_type

    string

    The custom channel type of the channel.

    (muted_channels).channel_url

    string

    The URL of the channel.

    (muted_channels).created_at

    long

    The time when the channel was created. The value is in Unix milliseconds format.

    (muted_channels).cover_url

    string

    The URL of the cover image of the muted channel.

    (muted_channels).data

    string

    Additional data of the muted channel.

    next

    string

    The value that can be used in the token parameter to retrieve the next page in the result set.

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