你可以使用此接口批量查询会话。
你可以调用BatchGetConversations接口,指定你所属的AppId和会话 ID 批量查询会话信息。
无法查询已解散会话。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
QPS 不得超过 100。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | BatchGetConversations | 接口名称,本接口取值:BatchGetConversations |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | Int | 是 | 000000 | 应用的唯一标志 |
| ConversationShortId | Array of Int | 是 | [000001] | 会话 ID |
| SkipMemberCount | Bool | 否 | false | 是否忽略获取会话成员数。
true。 |
https://rtc.volcengineapi.com?Action=BatchGetConversations&Version=2020-12-01
postscript{
"AppId":000000,
"ConversationShortId":[000001],
"SkipMemberCount":false
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| ConversationCoreInfo | ConversationCoreInfo | 是 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Name | String | 否 | conversation | 会话名称 |
| AvatarUrl | String | 否 | http://xxx.com | 会话头像 url |
| Description | String | 否 | Your_Description | 会话描述 |
| Notice | String | 否 | Your_Notice | 会话公告 |
| Ext | map-key(string)-value(string) | 否 | "unique-key" | 扩展字段 |
| ConversationType | Int | 是 | 1 | 会话类型
|
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "BatchGetConversations",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"ConversationCoreInfo":{
"Name":"Conversation",
"AvatarUrl":"http://xxx.xxx",
"Description":"Your_Description",
"Notice":"Your_Notice",
"Ext":{
"key":"value"
},
"ConversationType":2
}
}
json