你可以使用此接口分批在直播群中获得禁言或拉黑成员列表。

接口行为

你可以调用 BatchGetBlockParticipants 接口,指定你所属的 AppId、会话 ID、会话成员 UserId 列表和具体的操作行为,批量获取禁言或拉黑成员列表。
查询到的禁言/拉黑成员列表会按照成员 UserId 从小到大进行排序。

目前仅直播群支持此接口

调用接口

关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。

接口限制

QPS 不得超过 100。

请求方式

使用 POST 方式发起请求。

请求参数
Query
参数名类型必填示例值描述
ActionString是BatchGetBlockParticipants接口名称,本接口取值:BatchGetBlockParticipants
VersionString是2020-12-01接口版本,本接口取值:2020-12-01
Body
参数名类型必填示例值描述
AppIdInt是000000应用的唯一标志
ConversationShortIdInt是000001会话 ID
BlockActionInt否0操作行为
  • 0:获取禁言列表
  • 1:获取拉黑列表
默认为 0。
CursorInt是0分批起始位置
LimitInt是20每批查询条数,最大值为 20。
请求示例代码
Query
https://rtc.volcengineapi.com?Action=BatchGetBlockParticipants&Version=2020-12-01
postscript
Body
{
    "AppId":000000,
    "ConversationShortId":000001,
    "BlockAction":0,
    "Cursor":0,
    "Limit":20
}
json
返回调用结果
返回参数说明

返回结果参看 BaseResponse。
其中 Result 的结构如下:

参数名类型描述
ParticipantsArray of BlockParticipant禁言/拉黑成员列表
HasMorebool是否还有更多数据
NextCursorInt下一批数据起始位置
正常返回示例
{
    "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