You need to enable JavaScript to run this app.
导航
查询直播群成员状态 QueryLiveParticipantStatus
最近更新时间:2023.11.27 20:36:34首次发布时间:2023.06.21 18:41:10
我的收藏
有用
有用
无用
无用

你可以使用此接口查询群成员在直播群的状态。

接口行为

你可以调用QueryLiveParticipantStatus接口,指定你所属的AppId、会话 ID 和查询群成员的 UserId,查询指定成员在直播群的状态。

目前仅直播群支持此接口

一次最多支持查询 200 个群成员状态。如查询群成员数超过 200,只返回前 200 个成员状态。

调用接口

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

接口限制

QPS 不得超过 100。

请求方式

使用 POST 方式发起请求。

请求参数

Query

参数名类型必填示例值描述
ActionStringQueryLiveParticipantStatus接口名称,本接口取值:QueryLiveParticipantStatus
VersionString2020-12-01接口版本,本接口取值:2020-12-01

Body

参数名类型必填示例值描述
AppIdInt000000应用的唯一标志
ConversationShortIdInt000001会话 ID
ParticipantUserIdsArray of Int[10001,10002]查询群成员 UserId

请求示例代码

Query

https://rtc.volcengineapi.com?Action=QueryLiveParticipantStatus&Version=2020-12-01

Body

{
    "AppId":000000,
    "ConversationShortId":000001,
    "ParticipantUserIds":[10001,10002]
}

返回调用结果

返回参数说明

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

参数名类型描述
StatusArray of ParticipantStatus成员在直播群的状态

ParticipantStatus

参数名类型描述
AppIdInt应用的唯一标志
ConversationShortIdInt该成员所属会话 ID
ParticipantUserIdInt该成员 UserId
IsInConversationbool是否在群中
CreateTimeInt加群时间,单位为秒

正常返回示例

{
    "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
            }
        ]
    }
}