Clear the unread message count of a conversation
Overview
This API can clear the unread message count for a specified conversation of a specified user.
The client will receive unread count changes of conversations through the callback interface of the ZIM SDK.
iOS | Android | macOS | Windows |
---|---|---|---|
conversationChanged | onConversationChanged | conversationChanged | onConversationChanged |
Web | U3D | Flutter | React Native |
conversationChanged | onConversationChanged | onConversationChanged | conversationChanged |
Request method and endpoint
- Request method: GET
- Request endpoint:
https://zim-api.zego.im/?Action=ClearConversationUnread
- Protocol: HTTPS
- Rate limit: 20 times/second
Request parameters
The following list only shows the request parameters for this interface and some public parameters. For a complete list of public parameters, please refer to Accessing Server APIs - Public parameters.
Parameter | Type | Required | Description |
---|---|---|---|
FromUserId | String | Yes | Target user ID (registered). This API clears the unread message count for a conversation of the user. |
ConvId | String | Yes | The target conversation ID. |
ConvType | Number | Yes | Conversation type:
|
FromUserId only supports numbers, English characters, and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', ' ', '{', '}', '|', '~'.
Sample request
https://zim-api.zego.im/?Action=ClearConversationUnread
&FromUserId=user1
&ConvId=user2
&ConvType=0
&<Common request parameters>
Response parameters
Parameter | Type | Description |
---|---|---|
Code | Number | Return code. |
Message | String | Description of the request result. |
RequestId | String | Request ID. |
Sample response
{
"Code": 0,
"Message": "success",
"RequestId": "343649807833778782"
}
Return codes
The following list only shows the return codes related to the business logic of the interface. For a complete list of return codes, please refer to Return codes.
Return Code | Description | Solution |
---|---|---|
660800002 | The conversation does not exist, or the conversation is not applicable to this interface (it is not among the latest 1,000 conversations). | Please confirm whether the conversation ID is correct. |