你可以使用此接口查询群成员在直播群的状态。
你可以调用QueryLiveParticipantStatus
接口,指定你所属的AppId
、会话 ID 和查询群成员的 UserId,查询指定成员在直播群的状态。
目前仅直播群支持此接口
一次最多支持查询 200 个群成员状态。如查询群成员数超过 200,只返回前 200 个成员状态。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
QPS 不得超过 100。
使用 POST 方式发起请求。
参数名 | 类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | QueryLiveParticipantStatus | 接口名称,本接口取值:QueryLiveParticipantStatus |
Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
参数名 | 类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
AppId | Int | 是 | 000000 | 应用的唯一标志 |
ConversationShortId | Int | 是 | 000001 | 会话 ID |
ParticipantUserIds | Array of Int | 是 | [10001,10002] | 查询群成员 UserId |
https://rtc.volcengineapi.com?Action=QueryLiveParticipantStatus&Version=2020-12-01
{
"AppId":000000,
"ConversationShortId":000001,
"ParticipantUserIds":[10001,10002]
}
返回结果参看 BaseResponse。
其中 Result
的结构如下:
参数名 | 类型 | 描述 |
---|---|---|
Status | Array of ParticipantStatus | 成员在直播群的状态 |
ParticipantStatus
参数名 | 类型 | 描述 |
---|---|---|
AppId | Int | 应用的唯一标志 |
ConversationShortId | Int | 该成员所属会话 ID |
ParticipantUserId | Int | 该成员 UserId |
IsInConversation | bool | 是否在群中 |
CreateTime | Int | 加群时间,单位为秒 |
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "QueryLiveParticipantStatus",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"Status": [
{
"AppId": 000000,
"ConversationShortId": 000001,
"ParticipantUserId": 10003,
"IsInConversation": false,
"CreateTime": 0
},
{
"AppId": 000000,
"ConversationShortId": 000001,
"ParticipantUserId": 10001,
"IsInConversation": true,
"CreateTime": 1687068887
},
{
"AppId": 000000,
"ConversationShortId": 000001,
"ParticipantUserId": 10002,
"IsInConversation": false,
"CreateTime": 0
}
]
}
}