logo
In-app Chat
ZIMAudio
On this page

RevokeRoomMessage

POST

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

Note

To use this feature, please activate the ZIM flagship service to ensure that your App ID is set to enable saving room messages.

By calling this API, you can recall room conversation messages.

After a message is recalled, users in the room will receive a notification that the message has been recalled through the following ZIM SDK callback interfaces.

iOSAndroidmacOSWindows
messageRevokeReceivedonMessageRevokeReceivedmessageRevokeReceivedonMessageRevokeReceived
WebMini ProgramFlutterReact Native
messageRevokeReceivedmessageRevokeReceivedonMessageRevokeReceivedmessageRevokeReceived
Unity3Duni-app | uni-app xHarmonyOS
OnMessageRevokeReceivedmessageRevokeReceivedmessageRevokeReceived
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [RevokeRoomMessage]

    API prototype parameter

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

    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

    Message sender user ID (who has logged in to the ZIM service by calling the login method on the client, or has completed registration by calling the server-side API).

    RoomId stringrequired

    Possible values: <= 32 characters

    Room ID.

    MsgSeq numberrequired

    Message seq. How to obtain:

    • To recall a room message sent by the client, obtain MsgSeq through the message sent callback.
    • To recall a room message sent by the server-side API SendRoomMessage, obtain MsgSeq through the API response data.
    Payload string

    Possible values: <= 200 characters

    Recall additional information, maximum 200 bytes.

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
    660000001Business general error.Please retry or contact ZEGOCLOUD Technical Support.
    660000002Parameter error.Please refer to Request and enter the correct parameters.
    660000022Message not found, possibly because the message has been deleted or does not exist.Please check if the message has been deleted and if MsgSeq is correct.
    660000023Message has been recalled.Please confirm if the message has been recalled.
    • If confirmed that the message has been recalled, no action is needed.
    • If confirmed that the message has not been recalled, please contact ZEGOCLOUD Technical Support to troubleshoot the issue.
    660000027Save room messages configuration is not enabled.Please activate the ZIM flagship service.
    660300001Room does not exist.Confirm if RoomId is correct or if the room has been destroyed.
    660300002User is not in this room.Please confirm if UserId is correct.
    660300005The API call frequency exceeds the AppID-level limit.Please try again later, or refer to the relevant documentation to understand the call frequency.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

Previous

Recall a group message

Next

Push a message to all users

On this page

Back to top