logo
In-app Chat
ZIMAudio
On this page

ClearPeerMessage

POST

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

By calling this API, you can delete all messages from a specific user in a one-to-one conversation on the server side. Only the specified user will not be able to see these messages; the other user will not be affected.

Note
Example: User A and B are in a conversation. If you need to delete all one-to-one messages from user A, then FromUserId is A and ToUserId is B; if you need to delete all one-to-one messages from user B, then FromUserId is B and ToUserId is A.
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [ClearPeerMessage]

    API prototype parameter

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

    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.

Body

required
    FromUserId stringrequired

    Possible values: <= 32 characters

    The user ID that needs to delete all one-to-one messages.

    ToUserId stringrequired

    Possible values: <= 32 characters

    Message receiving user.

Responses

OK
Schema
    Code number

    Return code.
    For return codes, please refer to Return codes.

    Message string

    Description of the operation result.

    RequestId string

    Request ID.

Previous

Query messages

Next

Delete all messages from a group member

On this page

Back to top