https://xxxxxx/v4/recentcontact/update_contact_group?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
参数 | 说明 |
xxxxxx | SDKAppID 所在国家/地区对应的专属域名: 中国: console.tim.qq.com新加坡: adminapisgp.im.qcloud.com首尔: adminapikr.im.qcloud.com东京: adminapijpn.im.qcloud.com法兰克福: adminapiger.im.qcloud.com硅谷: adminapiusa.im.qcloud.com雅加达: adminapiidn.im.qcloud.com |
v4/recentcontact/update_contact_group | 请求接口。 |
sdkappid | 创建应用时 Chat 控制台分配的 SDKAppID。 |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295。 |
contenttype | 请求格式固定值为 json。 |
{"From_Account": "user_0001","UpdateType": 1,"UpdateGroup": {"UpdateGroupType": 1,"OldGroupName": "group_0001","NewGroupName": "group_0002"}}
{"From_Account": "user_0001","UpdateType": 1,"UpdateGroup": {"UpdateGroupType": 2,"OldGroupName": "group_0001","ContactUpdateItem": [{"ContactOptType": 1,"ContactItem": {"Type": 1,"To_Account": "user_0002"}},{"ContactOptType": 2,"ContactItem": {"Type": 2,"ToGroupId": "@TGS#1B2AUI7RZ"}}]}}
字段 | 类型 | 属性 | 说明 |
From_Account | String | 必填 | 填 UserID,请求更新该用户的会话分组。 |
UpdateType | Integer | 必填 | 更新类型: 1:更新分组名或更新指定分组下的会话。 |
UpdateGroup | Object | 选填 | 待更新的分组信息,更新分组名或更新指定分组下的会话时才赋值。 |
UpdateGroupType | Integer | 选填 | 分组更新类型: 1:更新分组名。 2:更新指定分组下的会话。 |
OldGroupName | String | 选填 | 待更新的分组名。 |
NewGroupName | String | 选填 | 更新后的分组名,最长64字节。 |
ContactUpdateItem | Array | 选填 | 待更新的会话。 |
ContactOptType | Integer | 必填 | 更新类型: 1:分组添加会话。 2:分组删除会话。 |
ContactItem | Object | 必填 | 会话对象 |
Type | Integer | 必填 | 会话类型: 1:表示 C2C 会话。 2:表示 G2C 会话。 |
ToGroupId | String | 选填 | G2C 会话才赋值,填会话方的群 ID。 |
To_Account | String | 选填 | C2C 会话才赋值,填会话方的 UserID。 |
{"UpdateType": 1,"UpdateGroupResult": {"UpdateGroupType": 1,"GroupName": "group_0002","GroupId": 1,"OldGroupName": "group_0001"},"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": ""}
{"UpdateType": 1,"UpdateGroupResult": {"UpdateGroupType": 2,"GroupName": "group_0001","GroupId": 1,"OldGroupName": "group_0001","ContactResultItem": [{"ContactOptType": 1,"ContactItem": {"Type": 1,"To_Account": "user_0002"},"ResultCode": 0,"ResultInfo": ""},{"ContactOptType": 2,"ContactItem": {"Type": 2,"ToGroupId": "@TGS#1B2AUI7RZ"},"ResultCode": 0,"ResultInfo": ""}]},"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": ""}
字段 | 类型 | 说明 |
UpdateType | Integer | 更新类型: 1:更新分组名或更新指定分组下的会话。 |
UpdateGroupResult | Object | 分组维度更新结果。 |
UpdateGroupType | Integer | 更新类型: 1:更新分组名。 2:更新会话分组。 |
GroupName | String | 当前操作的分组名称。 |
GroupId | Integer | 当前操作的分组 ID。 |
OldGroupName | String | 当前操作老的分组名称。 |
ContactResultItem | Array | 会话操作结果。 |
ContactOptType | Integer | 更新类型: 1:分组添加会话。 2:分组删除会话。 |
ContactItem | Object | 会话对象。 |
Type | Integer | 会话类型: 1:表示 C2C 会话。 2:表示 G2C 会话。 |
ToGroupId | String | G2C 会话才会返回,返回会话方的群 ID。 |
To_Account | String | C2C 会话才会返回,返回会话方的 UserID。 |
ResultCode | Integer | |
ResultInfo | String | To_Account 的错误描述信息,成功时该字段为空。 |
ActionStatus | String | 请求处理的结果: OK 表示处理成功。 FAIL 表示失败。 |
ErrorCode | Integer | 错误码: 0表示成功。 非0表示失败。 |
ErrorInfo | String | 错误信息。 |
错误码 | 描述 |
50001 | 请求的 UserID 没有导入 Chat,请先将 UserID 导入 Chat。 |
50002 | 请求参数错误,请根据错误描述检查请求参数。 |
50003 | 请求需要 App 管理员权限。 |
50004 | 服务端内部错误,请重试。 |
50005 | 网络超时,请稍后重试。 |
51007 | GroupID 换 GroupCode 失败,内部错误或 Group 已经解散。 |
51008 | 会话分组下的会话数已达系统上限(默认支持1000个会话)。 |
51011 | 会话分组名超过64字节。 |
51013 | 当前版本暂不支持会话分组功能,请升级到专业版、专业版 Plus 或企业版后使用。 |
文档反馈