你可以使用此接口更新直播群成员资料。
你可以调用 BatchUpdateLiveParticipants 接口,指定你所属的AppId、会话 Id、 直播群成员 ID 来更新群成员资料。
目前仅直播群支持此接口
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
QPS 不得超过 50。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | BatchUpdateLiveParticipants | 接口名称,本接口取值:BatchUpdateLiveParticipants |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | Int | 是 | 000000 | 应用的唯一标志 |
| ConversationShortId | Int | 是 | 000001 | 会话 ID |
| ParticipantInfos | Array Of ParticipantInfo | 是 | / | 需要更新的成员资料。一次最多支持 10 个成员 |
ParticipantInfo
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| UserId | Int | 是 | 10001 | 群成员用户ID |
| AvatarUrl | String | 否 | Your_AvatarUrl | 群成员头像。AvatarUrl、NickName和Ext均为非必填参数,但是至少需要填一个,否则服务端会报错。 |
| NickName | String | 否 | Your_NickName | 群成员昵称 |
| Ext | map-key(string)-value(string) | 否 | "key":"value" | 群成员扩展字段。 |
https://rtc.volcengineapi.com?Action=QueryLiveParticipantStatus&Version=2020-12-01
postscript{
"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 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| FailedInfos | Array of FailedInfo | 更新资料失败的群成员信息 |
FailedInfo
| 参数名 | 类型 | 描述 |
|---|---|---|
| UserId | Int64 | 更新资料失败的群成员的UserId |
| Code | String | 错误码 |
| Message | String | 错误描述 |
{
"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