你可以使用此接口在直播群中批量禁言或拉黑会话成员。
你可以调用BatchAddBlockParticipants接口,指定你所属的AppId、会话 ID、 会话成员 UserId 和具体的操作行为,来批量禁言或者拉黑会话成员。
目前仅直播群支持此接口
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
QPS 不得超过 50。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | BatchAddBlockParticipants | 接口名称,本接口取值:BatchAddBlockParticipants |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | Int | 是 | 000000 | 应用的唯一标志 |
| ConversationShortId | Int | 是 | 000001 | 会话 ID |
| BlockAction | Int | 否 | 0 | 操作行为
1:拉黑。用户无法加入直播群。0 |
| ParticipantBlockInfos | map<Int, Int> | 是 | {10001:6000} | key 为群成员 ID,value 为禁言或者拉黑时长, 单位为秒 |
https://rtc.volcengineapi.com?Action=BatchAddBlockParticipants&Version=2020-12-01
Postscript{
"AppId":000000,
"ConversationShortId":000001,
"BlockAction":0,
"ParticipantBlockInfos":{
10001:6000,
10002:5000
}
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| FailedParticipantUserIds | Array of Int | 禁言或者拉黑失败的会话成员 UserId |
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "BatchAddBlockParticipants",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"FailedParticipantUserIds": []
}
}
json