你可以使用此接口更新直播群成员资料。

接口行为

你可以调用 BatchUpdateLiveParticipants 接口,指定你所属的AppId、会话 Id、 直播群成员 ID 来更新群成员资料。

目前仅直播群支持此接口

调用接口

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

接口限制

QPS 不得超过 50。

请求方式

使用 POST 方式发起请求。

请求参数
Query
参数名类型必填示例值描述
ActionString是BatchUpdateLiveParticipants接口名称,本接口取值:BatchUpdateLiveParticipants
VersionString是2020-12-01接口版本,本接口取值:2020-12-01
Body
参数名类型必填示例值描述
AppIdInt是000000应用的唯一标志
ConversationShortIdInt是000001会话 ID
ParticipantInfosArray Of ParticipantInfo是/需要更新的成员资料。一次最多支持 10 个成员


ParticipantInfo

参数名类型必填示例值描述
UserIdInt是10001群成员用户ID
AvatarUrlString否Your_AvatarUrl群成员头像。AvatarUrl、NickName和Ext均为非必填参数,但是至少需要填一个,否则服务端会报错。
NickNameString否Your_NickName群成员昵称
Extmap-key(string)-value(string)否"key":"value"群成员扩展字段。
请求示例代码
Query
https://rtc.volcengineapi.com?Action=QueryLiveParticipantStatus&Version=2020-12-01
postscript
Body
{
    "AppId":000000,
    "ConversationShortId":000001,
    "ParticipantInfos":[
    {
        "UserId":10002,
        "AvatarUrl":"https://xxxx.com",
        "NickName":"Nickname1",
        "Ext":{
            "key":"value"
        }
        "Alias": "Alias1"
    },
    {
        "UserId":10001,
        "AvatarUrl":"https://yyyy.com",
        "NickName":"Nickname2",
        "Ext":{
            "key":"value"
        }
        "Alias": "Alias2"
    },
    {
        "UserId":99999,
        "AvatarUrl":"https://xxxx.com",
        "NickName":"Nickname3",
        "Ext":{
            "key":"value"
        }
        "Alias": "Alias3" 
    }
   ]
}
json
返回调用结果
返回参数说明

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

参数名类型描述
FailedInfosArray of FailedInfo更新资料失败的群成员信息

FailedInfo

参数名类型描述
UserIdInt64更新资料失败的群成员的UserId
CodeString错误码
MessageString错误描述
正常返回示例
{
    "ResponseMetadata": {
        "RequestId": "2023092620261328037E0DB0EC6C03DD41",
        "Action": "BatchUpdateLiveParticipants",
        "Version": "2020-12-01",
        "Service": "rtc",
        "Region": "cn-north-1"
    },
    "Result": {
        "FailedInfos": [
            {
                "UserId": 99999,
                "Code": "ParticipantNotInConversation",
                "Message": "participant not in conversation"
            }
        ]
    }
}
json