你可以使用此接口批量查询会话。

接口行为

你可以调用BatchGetConversations接口,指定你所属的AppId和会话 ID 批量查询会话信息。

无法查询已解散会话。

调用接口

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

接口限制

QPS 不得超过 100。

请求方式

使用 POST 方式发起请求。

请求参数
Query
参数名类型必填示例值描述
ActionString是BatchGetConversations接口名称,本接口取值:BatchGetConversations
VersionString是2020-12-01接口版本,本接口取值:2020-12-01
Body
参数名类型必填示例值描述
AppIdInt是000000应用的唯一标志
ConversationShortIdArray of Int是[000001]会话 ID
SkipMemberCountBool否false是否忽略获取会话成员数。
  • true: 忽略。
  • false:不忽略。
默认值为 true。
请求示例代码
Query
https://rtc.volcengineapi.com?Action=BatchGetConversations&Version=2020-12-01
postscript
Body
{
    "AppId":000000,
		"ConversationShortId":[000001],
    "SkipMemberCount":false
}
json
返回调用结果
返回参数说明

返回结果参看 BaseResponse。

其中 Result 的结构如下:

参数名类型描述
ConversationCoreInfosArray of ConversationInfo会话详细信息
正常返回示例
{
    "ResponseMetadata": {
        "RequestId": "Your_RequestId",
        "Action": "BatchGetConversations",
        "Version": "2020-12-01",
        "Service": "rtc",
        "Region": "cn-north-1"
    },
    "Result": {
        "ConversationCoreInfos": [
            {
                "ConversationShortId": 000001,
                "AppId": 000000,
                "InboxType": 0,
                "Name": "Conversation",
                "AvatarUrl": "http://xxx.com",
                "Description": "Your_Description",
                "OwnerUserId": 100001,
                "CreatorUserId": 100001,
                "Notice": "Your_Notice",
                "Status": 0,
                "Ext": {
                    "key": "value"
                },
                "CreateTime": 1690863275,
                "ModifyTime": 1690863275,
                "ConversationType": 2,
                "MemberCount": 0,
                "OnlineCount": 0,
                "OtherUserId": 10002
            }
        ]
    }
}
json