你可以使用此接口分批扫描群中成员的详细信息。
你可以调用ScanConversationParticipantList接口,指定你所属的AppId、会话 ID,查询起始位置和人数,分批扫描群中成员的详细信息。
若只查询群成员的 UserId,单次最多可查询 500 人;若需查询群成员详细信息,单次最多可查询100 人。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | ScanConversationParticipantList | 接口名称,本接口取值:ScanConversationParticipantList |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | Int | 是 | 000000 | 应用的唯一标志 |
| ConversationShortId | Int | 是 | 000001 | 会话 ID |
| Cursor | Int | 是 | 1 | 查询起始位置 |
| Limit | Int | 是 | 2 | 查询人数 |
| Reverse | Bool | 否 | false | 按照进群的时间正序或逆序查询。
fasle。 |
| OnlyUserIds | Bool | 否 | false | 是否只查询群成员 UserId。
false。 |
https://rtc.volcengineapi.com?Action=ScanConversationParticipantList&Version=2020-12-01
postscript{
"AppId":000000,
"ConversationShortId":000001,
"Cursor":1,
"Limit":2,
"Reverse":true
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| HasMore | Bool | 是否还有下一页 |
| NewCursor | Int | 下一页起始位置。为负时表示后续没有成员数据 |
| Participants | Array of Participant | 群成员详细信息 |
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "BatchModifyConversationParticipant",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"Participants": [
{
"ConversationShortId": 000001,
"ParticipantUserId": 10001,
"Level": 1,
"NickName": "NickName1",
"Operator": 000010,
"Status": 0,
"CreateTime": 1669694619,
"Ext": {
"key": "value",
"s:from": "biz"
},
"Role": 1,
"BlockTime": 0
},
{
"ConversationShortId": 000001,
"ParticipantUserId": 10002,
"Level": 1,
"NickName": "NickName2",
"Operator": 000010,
"Status": 0,
"CreateTime": 1669694619,
"Ext": {
"key": "value",
"s:from": "biz"
},
"Role": 1,
"BlockTime": 0
}
],
"HasMore": true,
"NextCursor": 3
}
}
json