你可以使用此接口批量删除群成员。
你可以调用BatchDeleteConversationParticipant接口,指定你所属的AppId、会话 ID,操作人 ID和待删除群成员 UserId 来批量删除群成员。
单聊无法调用此接口。
服务端并不会对删除群成员的执行者做预先校验,如判断其是否在群中、是否有权限等。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | BatchDeleteConversationParticipant | 接口名称,本接口取值:BatchDeleteConversationParticipant |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | Int | 是 | 000000 | 应用的唯一标志 |
| ConversationShortId | Int | 是 | 000001 | 会话 ID |
| Operator | Int | 是 | 000010 | 执行删除群成员操作人的 UserId |
| ParticipantUserIds | Array of Int | 是 | [10001,10002] | 需要删除群成员的 UserId |
https://rtc.volcengineapi.com?Action=BatchDeleteConversationParticipant&Version=2020-12-01
postscript{
"AppId":000000,
"ConversationShortId":000001,
"Operator":000010,
"ParticipantUserIds": [10001,10002]
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| FailedUserIds | Int of Array | 成功时为空,失败时返回失败用户 ID |
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "BatchModifyConversationParticipant",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"FailedUserIds": []
}
}
json