logo
In-app Chat
ZIMAudio
On this page

ClearConversationUnread

GET

https://zim-api.zego.im/

This API can clear the unread message count of a specified conversation for a specified user.

Note
This API is only applicable to the user's latest 1000 conversations by default. If you need to apply it to more conversations, please contact ZEGOCLOUD Technical Support.

The client will receive changes in the unread count of the conversation through the following ZIM SDK callback:

iOSAndroidmacOSWindows
conversationChangedonConversationChangedconversationChangedonConversationChanged
WebMini ProgramFlutterReact Native
conversationChangedconversationChangedonConversationChangedconversationChanged
Unity3Duni-app | uni-app xHarmonyOS
OnConversationChangedconversationChangedconversationChanged
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [ClearConversationUnread]

    API prototype parameter

    https://zim-api.zego.im/?Action=ClearConversationUnread

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature example for how to generate.

    Timestamp int64required

    💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature example for how to generate, with a maximum error of 10 minutes.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    Signature stringrequired

    💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.

    FromUserId stringrequired

    Possible values: <= 32 characters

    Target user ID (registered). This API clears the unread message count of a conversation for this user.

    ConvId stringrequired

    Possible values: <= 32 characters

    Target conversation ID. For one-on-one chats, it is the user ID; for group chats, it is the group ID.

    ConvType int32required

    Possible values: [0, 2]

    Conversation type:

    • 0 for one-on-one;
    • 2 for group.

Responses

OK
Schema
    Code number

    Return code.

    The following only lists the return codes related to the API business logic. For the complete return codes, please refer to Return codes.

    Return codeDescriptionSuggested Solution
    660800002Conversation does not exist, or this conversation is not applicable to this API (not among the latest 1000 conversations).Please confirm if the conversation ID is correct.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

Previous

Set conversation marks

Next

Delete a conversation

On this page

Back to top