In-app Chat
  • iOS : Objective-C
  • Android
  • Web
  • Flutter
  • React Native
  • Unity3D
  • Windows
  • macOS
  • Introduction
    • Overview
    • Basic concepts
  • Sample app
  • Getting started
  • Client SDKs
    • SDK downloads
    • Release notes
    • Upgrade guide
  • Guides
    • Authentication
    • Manage users
    • Room
    • Group
    • Messaging
    • Call invitation (signaling)
    • Manage sessions
  • Offline push notifications
  • Error codes
  • Client APIs
  • Server APIs
  • Documentation
  • In-app Chat
  • Server APIs
  • Message related
  • Recall a group message

Recall a group message

Last updated:2024-04-01 10:38

Overview

You can call this operation to recall a group message sent within two minutes. To recall an earlier message, contact ZEGOCLOUD technical support. You can recall a message sent within 24 hours at maximum.

After a message is recalled, recipients receive the notification in the following ZIM SDK callbacks.

Operation prototype

  • Request method: POST
  • Request URL: https://zim-api.zego.im/?Action=RevokeGroupMessage
  • Protocol: HTTPS
  • QPS limit: 20 calls per second

Request parameters

The following table describes only the operation-specific request parameters and some common request parameters. For the complete list of common request parameters, see the Public request parameters section of the Accessing Server APIs topic.

Parameter Type Required Description
FromUserId
String
Yes
The ID of the message sender.
GroupId
String
Yes
The group chat ID.
MsgSeq
Number
Yes
The sequence of the message. Method for obtaining MsgSeq: - If a group message is sent from the client, obtain MsgSeq by using the Callback on message sent operation. - If a group message is sent by using the server API SendGroupMessage, obtain MsgSeq in the response data.
Payload
String
No
The additional information of the recalling operation, which cannot exceed 200 bytes in length.
OfflinePush
Object
No
The offline push configuration. For more information, see OfflinePush Description.

Sample request

  • Request URL:

    https://zim-api.zego.im/?Action=RevokeGroupMessage
    &<Common request parameters>
  • Request body:

      {
          "FromUserId": "u1",
          "GroupId": "group1",
          "MsgSeq": 10,
          "Payload": "payload",
          "OfflinePush" :{
              "Enable":1,
              "Title":"title",
              "Content":"content",
              "Payload":"payload"
          }
      }

Response parameters

Parameter Type Description
Code
Number
The return code.
Message
String
The description of the request result.
RequestId
String
The request ID.

Sample response

{
    "Code": 0,
    "Message": "success",
    "RequestId": "343649807833778782"
}

Return codes

The following table describes only the return codes related to the business logic of the operation. For the complete list of return codes, see Return codes.

Return Code Description Solution
660000002
Invalid parameter.
Check the input parameter. For more information, see Request parameters.
660000022
The message is not found, which may be that the message has been deleted or does not exist.
Check whether the message has been deleted and whether the value of the MsgSeq parameter is valid.
660000023
The message has been recalled.
Check whether the message has been recalled.
  • If so, no handling is required.
  • If not, contact ZEGOCLOUD technical support.
660000024
The message has been sent too long.
If you need to recall a message sent a long time ago, contact ZEGOCLOUD technical support.
660000026
The message to be recalled and FromUserId do not match.
Check whether the value of the FromUserId parameter is valid.
660300005
The QPS limit specified in AppID is exceeded.
Try again later, or check the QPS limit on related documentation.
660600001
The group chat does not exist.
Check whether the value of the GroupId parameter is valid.
Page Directory