User

View number of channels with unread messages

Changed on

View number of channels with unread messages

This action retrieves the total number of group channels in which a user has unread messages. You can use various query parameters to determine the search scope of group channels.

https://sendbird.com/docs/chat/platform-api/v3/user/managing-unread-count/get-number-of-channels-with-unread-messages#1-get-number-of-channels-with-unread-messages

get/v3/users/{user_id}/unread_channel_count

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Path parameters

user_idstring required

(Required)

Query parameters

custom_typesstring
super_mode'all' | 'super' | 'nonsuper'

Restricts the search scope to either Supergroup channels or non-Supergroup channels or both. Acceptable values are all, super, and nonsuper. (Default: all)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Response

Successful response

unread_countinteger

Example response

{
  "unread_count": 0
}

Changes

    • breaking

      the query request parameter super_mode was restricted to a list of enum values

    • warning

      deleted the header request parameter Api-Token

    • info

      added the new optional header request parameter api-token

    • info

      added the new enum value all to the query request parameter super_mode

    • info

      added the new enum value nonsuper to the query request parameter super_mode

    • info

      added the new enum value super to the query request parameter super_mode

    • info

      for the query request parameter custom_types, the type was generalized from array to string

    • info

      the header request parameter Api-Token became optional