Overview
Deletes messages by message ID. Messages can be deleted from one user's view or for all conversation participants. The operation is automatically synchronized across the current user's clients.
Request
Authentication: Add authentication headers to the request. See Authentication.
Method
POST
Rate limit
100 requests/second
Endpoint https://API domain/apigateway/hismsgs/del
Content-Type
application/json
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| from_id | string | No | For a private chat, the ID of one participant. Maximum length: 32 characters. | |
| target_id | string | Yes | For a private chat, the ID of the other participant; for a group chat, the group ID. Maximum length: 32 characters. | |
| channel_type | int | Yes | Conversation type. 1: private chat; 2: group chat. | |
| del_scope | int | No | Deletion scope. 0: delete messages only from the from_id user's view; 1: delete messages for all participants in the private or group conversation. | |
| msgs | array | Yes | Messages to delete. | |
| msgs[].msg_id | string | Yes | ID of the message to delete. Maximum length: 20 characters. |
Request Example
POST /apigateway/hismsgs/del HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json
{
"from_id":"xxx",
"target_id":"xxx",
"channel_type":1,
"del_scope":0,
"msgs":[
{
"msg_id":"xxxxx"
}
]
}
Response Example
{
"code":0,
"msg":"sucess"
}