你可以使用此接口分批在直播群中获得禁言或拉黑成员列表。
你可以调用 BatchGetBlockParticipants 接口,指定你所属的 AppId、会话 ID、会话成员 UserId 列表和具体的操作行为,批量获取禁言或拉黑成员列表。
查询到的禁言/拉黑成员列表会按照成员 UserId 从小到大进行排序。
目前仅直播群支持此接口
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
QPS 不得超过 100。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | BatchGetBlockParticipants | 接口名称,本接口取值:BatchGetBlockParticipants |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | Int | 是 | 000000 | 应用的唯一标志 |
| ConversationShortId | Int | 是 | 000001 | 会话 ID |
| BlockAction | Int | 否 | 0 | 操作行为
0。 |
| Cursor | Int | 是 | 0 | 分批起始位置 |
| Limit | Int | 是 | 20 | 每批查询条数,最大值为 20。 |
https://rtc.volcengineapi.com?Action=BatchGetBlockParticipants&Version=2020-12-01
postscript{
"AppId":000000,
"ConversationShortId":000001,
"BlockAction":0,
"Cursor":0,
"Limit":20
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| Participants | Array of BlockParticipant | 禁言/拉黑成员列表 |
| HasMore | bool | 是否还有更多数据 |
| NextCursor | Int | 下一批数据起始位置 |
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "BatchGetBlockParticipants",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"HasMore": false,
"NextCursor": 10003,
"BlockParticipants": [
{
"ParticipantUserId": 10001,
"CreateTime": 1682321838,
"BlockTime": 1682327838
},
{
"ParticipantUserId": 10002,
"CreateTime": 1682321838,
"BlockTime": 1682326838
}
]
}
}
json