# Delete group messages

Debugging Tools

Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide

Interface English name: deleteMassMsg

After a group message, you can delete the group message at any time through this interface.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token=ACCESS_TOKEN

# Cloud Calls

  • This interface does not support cloud calls

# Third party invocation

  • This interface supports Third Party Platform generation business call.

  • The permission set id to which the interface belongs is: 7

  • When a service provider is authorized by one of the permissions set, it can call on behalf of the merchant by using authorizer_access_token , which can be viewed in the third-party call documentation.

# 2. Request parameters

# Query parametersQuery String parameters

Parameter NametypeRequired to fill inIntroductions
access_tokenstringyesInterface invocation credentials, using access_token , authorizer_access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inIntroductions
msg_idnumbernoMessage ID sent
article_idxnumberyesTo delete the position of the article in the text message. The first article is numbered 1. Without the field or a blank field will delete the entire article
urlstringnoThe article url to delete, this parameter takes effect when msg_id is not specified

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError message

# 4. Note

  1. Both msg_id and url must have one parameter with a passing value. Only msg_id is valid when both parameters have values.
  2. Article_idx only takes effect if msg_id has a pass value.
  3. Only messages sent through the API that have been successfully sent can be deleted.
  4. Deleting a message nullifies the message's visual details page and allows the user who has received the message card to see it locally.
  5. To delete group messages, you can only delete text and video messages; other types of messages cannot be deleted once they have been sent.
  6. If multiple groups send a text message, deleting one of the groups deletes the text message page, causing all groups to fail.

# 5. Code examples

Example Requests

{
   "msg_id":30124,
   "article_idx":2
}

Return an example

{
   "errcode":0,
   "errmsg":"ok"
}

# 6. Error code

The following is a list of error codes for this interface, other error codes can refer to General error codes

Error codeError DescriptionSolutions
0okOK means to go from abnormal to normal in a normal state

# 7. Scope of application

How this interface can be invoked under different account types:
Official Account Service Account
Certification only Certification only
  • Authentication only: means that only authenticated accounts are allowed to be invoked by the enterprise entity, and accounts that are not authenticated or do not support authentication cannot be invoked.
  • Other account types that are not expressly stated may not be called on this interface without special instructions;