Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/robot/groupMessages/recall |
| HTTP Method | POST |
| Supported app types | appType-Internal app appType-Third-party enterprise app |
| Required permissions | permission-qyapi_robot_sendmsg-Permission for bots to send messages within your organization |
Request header
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. Obtain it as follows: - For an internal app, call the Get the access token of an internal app API. - For a third-party enterprise app, call the Get the access token of an authorized enterprise for a third-party app API. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| openConversationId | String | Yes | The group ID. Obtain the group chat openConversationId on the client side via chooseChat. This must match the openConversationId used when calling the Send group chat messages with a bot API. |
| robotCode | String | Yes | The code of the bot. See Bot ID for details. This must match the robotCode used when calling the Send group chat messages with a bot API. |
| processQueryKeys | Array of String | Yes | The list of message IDs. Obtain these values from the processQueryKey field returned by the Send group chat messages with a bot API. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| successResult | Array of String | The list of message IDs that were successfully recalled. Note No prompt appears in the chat window when a bot message is recalled. |
| failedResult | Map<String, String> | The list of message IDs that failed to be recalled, along with the reason for each failure. |
Response body example
Error codes
If the API call returns an error, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalid.openConversationId | %s | Invalid openConversationId. Verify that the openConversationId is correct. |
| 400 | invalidParameter.robotCode | %s | Invalid robotCode. Verify that the bot is in the group. |
| 400 | invalidParameter.processQueryKeys.overMax | %s | processQueryKeys exceeds the maximum limit of 20. Split processQueryKeys into multiple arrays of no more than 20 entries each and call this API in batches. |
| 400 | not.allowed.robotCode | %s | Unauthorized robotCode. |
| 400 | invalidParameter.param.invalid | %s | Invalid parameter. Verify that no parameter is empty. |
| 400 | invalidParameter.robotCode.notExsit | %s | The bot does not exist. Verify that the bot corresponding to the robotCode is installed in the chat. |
| 400 | miss.chatbotId | %s | Missing robotCode. |
| 400 | invalidParameter.processQueryKey.missing | %s | Missing processQueryKey. |
| 400 | invalid.processQueryKey | %s | Invalid processQueryKey. Verify that the processQueryKey is correct. |
| 400 | miss.openConversationId | %s | Missing openConversationId. |
| 400 | bot.stopped | %s | The group bot has been disabled. |
| 400 | template.not.existed | %s | The bot template does not exist. |
| 400 | template.stopped | %s | The bot template has been disabled. |
| 500 | system.error | %s | Unknown system error. |