你可以使用此接口查询会话成员对会话的设置。

使用说明
接口行为

你可以调用GetConversationSetting接口,指定你所属的AppId、会话 ID和会话成员 UserId,查询会话成员对会话的设置。

调用接口

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

注意事项

QPS 不得超过 100。

请求说明
请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。

Query
参数类型是否必选示例值描述
ActionString是GetConversationSetting接口名称。当前 API 的名称为 GetConversationSetting。
VersionString是2020-12-01接口版本。当前 API 的版本为 2020-12-01。
Body
参数类型是否必选示例值描述
AppIdInteger是000000应用的唯一标志
ParticipantUserIdLong是10001会话成员 UserId,UserId 必须大于 0。
ConversationShortIdLong是000001会话 ID

NoReadIndex

Boolean

否

false

是否需要该成员在会话中的已读位置。

  • true:不需要。
  • false:需要。
返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构。

参数类型示例值描述
ConversationSettingInfoObject of ConversationSettingInfo-用户会话设置
ConversationSettingInfo
参数类型示例值描述
AppIdInteger000000应用的唯一标志
ParticipantUserIdLong10001群成员UserId
ConversationShortIdLong000001会话 ID

ConversationType

Integer

1

会话类型。

  • 1:单聊
  • 2:群聊
InboxTypeInteger0信箱,用于逻辑隔离
StickTopTimeLong1666495802476129置顶时间,单位为毫秒。0表示未置顶

IsStickTop

Boolean

true

是否置顶。

  • true:置顶。
  • false:不置顶
SetFavoriteTimeLong1666495802476129收藏时间,单位为毫秒。 0表示未收藏

IsSetFavorite

Boolean

true

是否收藏。

  • true:收藏。
  • false:不收藏

IsMute

Boolean

true

是否开启免打扰。

  • true:开启。
  • false:不开启
ExtJSON Map{"key":"value"}扩展字段。 key 的数据类型为 String,value 的数据类型为 String。
ReadIndexLong0用户已读位置
请求示例
POST https://rtc.volcengineapi.com?Action=GetConversationSetting&Version=2020-12-01
{
    "AppId": 000000,
    "ParticipantUserId": 10001,
    "ConversationShortId": 000001,
    "NoReadIndex": false
}
json
返回示例
{
    "ResponseMetadata": {
        "RequestId": "Your_RequestId",
        "Action": "GetConversationSetting",
        "Version": "2020-12-01",
        "Service": "rtc",
        "Region": "cn-north-1"
    },
    "Result": {
        "ConversationSettingInfo": {
            "AppId": 0,
            "ParticipantUserId": 10001,
            "ConversationShortId": 1,
            "ConversationType": 1,
            "InboxType": 0,
            "StickTopTime": 1666495802476129,
            "IsStickTop": true,
            "SetFavoriteTime": 1666495802476129,
            "IsSetFavorite": true,
            "IsMute": true,
            "ReadIndex": 0
        }
    }
}
json
错误码

您可访问公共错误码,获取更多错误码信息。