你可以使用此接口批量查询会话。
你可以调用BatchGetConversations接口,指定你所属的AppId和会话 ID 批量查询会话信息。
无法查询已解散会话。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
使用 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 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| ConversationInfos | ConversationInfo | 会话详细信息 |
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "BatchGetConversations",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"ConversationInfos": [{
"ConversationId": 000001,
"AppId": 000000,
"InboxType": 0,
"Name": "Conversation",
"AvatarUrl": "http://xxx.com",
"Description": "Your_Description",
"OwnerUid": 100001,
"CreatorUid": 100001,
"Notice": "Your_Notice",
"Status": 0,
"Ext": {
"key": "value"
},
"CreateTime": 1666598278,
"ModifyTime": 1666598278,
"ConversationType": 1,
"MemberCount": 2
}]
}
}
json