Get number of unread messages
This action retrieves a user's total number of unread messages in group channels.
Note: The unread count feature is only available for group channels.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Parameters
Required | Type | Description |
---|---|---|
user_id | string | Specifies the unique ID of a user. |
Optional | Type | Description |
---|---|---|
custom_types[] | array of strings | Specifies an array of one or more custom types to filter group channels with the corresponding types. |
super_mode | string | Restricts the search scope to either Supergroup channels or non-Supergroup channels or both. Acceptable values are |
Responses
If successful, this action returns the total number of the user's unread messages in the group channels in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
unread_count | long | The total number of the user's unread messages. |
Error
In the case of an error, an error object like below is returned. See the error codes section for more details.