跳到主要内容

多个用户对同一会话设置字段

简要描述

  • 多个用户对同一会话可选择性的设置字段。

请求方式

  • post

请求URL

  • http://x.x.x.x:10002/conversation/set_conversations
header名示例值选填类型说明
operationID1646445464564必填stringoperationID用于全局链路追踪
tokeneyJhbxxxx3Xs必填string管理员token

请求参数示例

{
"userIDs": [
"6965946400"
],
"conversation": {
"conversationID": "si_4365007572_6965946400",
"conversationType": 1,
"userID": "4365007572",
"groupID": "",
"recvMsgOpt": 0,
"isPinned": false,
"isPrivateChat": true,
"ex": "",
"burnDuration": 30
}
}
字段名选填类型说明
userIDs必填array要设置会话字段的用户ID列表
conversation必填object会话对象
conversation.conversationID必填string会话ID
conversation.conversationType必填int会话类型,单聊为1,群聊为3
conversation.userID选填string会话类型为单聊时必填
conversation.groupID选填string会话类型为群聊时必填
conversation.recvMsgOpt选填int会话免打扰状态
conversation.isPinned选填boolean会话是否置顶
conversation.isPrivateChat选填boolean是否开启阅后即焚
conversation.ex选填string会话扩展字段
conversation.burnDuration选填string设置会话阅后即焚时间,单位秒

成功返回示例

{
"errCode": 0,
"errMsg": "",
"errDlt": ""
}

成功返回示例的参数说明

参数名类型说明
errCodeint错误码,0表示成功
errMsgstring错误简要信息,无错误时为空
errDlterrDlt错误详细信息,无错误时为空
dataobject通用数据对象,具体结构见下方

失败返回示例

{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}

失败返回示例的参数说明

参数名类型说明
errCodeint错误码,具体查看全局错误码文档
errMsgstring错误简要信息
errDlterrDlt错误详细信息