群组类型 ID | 是否支持此 REST API |
Private | 支持,同新版本中的 Work(好友工作群),但默认不返回已加入但未激活的此类型群信息 |
Public | 支持 |
ChatRoom | 支持,同新版本中的 Meeting(临时会议群) |
AVChatRoom | 支持,但默认不返回此类型群信息。如果指定拉取 AVChatRoom 类型群信息,获得的群信息可能不完整,AVChatRoom 并不存储所有的群成员资料。 |
Community(社群) | 支持 |
https://xxxxxx/v4/group_open_http_svc/get_joined_group_list?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
参数 | 说明 |
xxxxxx | SDKAppID 所在国家/地区对应的专属域名: 中国: console.tim.qq.com 新加坡: adminapisgp.im.qcloud.com 首尔: adminapikr.im.qcloud.com 法兰克福: adminapiger.im.qcloud.com 硅谷: adminapiusa.im.qcloud.com 雅加达: adminapiidn.im.qcloud.com |
v4/group_open_http_svc/get_joined_group_list | 请求接口 |
sdkappid | 创建应用时即时通信 IM 控制台分配的 SDKAppID |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295 |
contenttype | 请求格式固定值为 json |
{"Member_Account": "leckie"}
(页码数– 1)×每页展示的群组数量
。
例如:假设需要分页拉取,每页展示20个,则第一页的请求参数应当为:{“Limit”: 20, “Offset”: 0}
,第二页的请求参数应当为{“Limit”: 20, “Offset”: 20}
,依此类推。{"Member_Account": "leckie","Limit": 10, // 拉取多少个,不填标识拉取全部"Offset": 0 // 从第多少个开始拉取}
{"Member_Account": "leckie","GroupType": "Public" // 拉取哪种群组类型,不填为拉取所有}
{"Member_Account": "leckie","WithHugeGroups":1, //支持拉取 AVChatRoom(直播群)信息"WithNoActiveGroups":1,//支持拉取已加入但未激活的 Private(即新版本中 Work,好友工作群) 信息"Limit": 10, // 拉取多少个,不填标识拉取全部"Offset": 0, // 从第多少个开始拉取"ResponseFilter": {"GroupBaseInfoFilter": [ // 需要哪些基础信息字段"Type","Name","Introduction","Notification"],"SelfInfoFilter": [ // 需要自身在群内的信息"Role", // 群内身份"JoinTime" // 入群时间]}}
{"Member_Account": "107867", // 需要查询的用户账号(必填)"SupportTopic": 1 // 指定查询的群类型是否支持话题,仅社群类型支持此字段}
{"Member_Account": "leckie","WithHugeGroups":1,"WithNoActiveGroups":1,"ResponseFilter": {"GroupBaseInfoFilter": ["Type","Name","Introduction","Notification","FaceUrl","CreateTime","Owner_Account","LastInfoTime","LastMsgTime","NextMsgSeq","MemberNum","MaxMemberNum","ApplyJoinOption","MuteAllMember"],"SelfInfoFilter": ["Role","JoinTime","MsgFlag","MsgSeq"]}}
字段 | 类型 | 属性 | 说明 |
Member_Account | String | 必填 | 需要查询的用户账号 |
WithHugeGroups | Integer | 选填 | 是否获取用户加入的 AVChatRoom(直播群),0表示不获取,1表示获取。默认为0 |
WithNoActiveGroups | Integer | 选填 | 是否获取用户已加入但未激活的 Private(即新版本中 Work,好友工作群)群信息,0表示不获取,1表示获取。默认为0 |
Limit | Integer | 选填 | 单次拉取的群组数量,如果不填代表所有群组 |
Offset | Integer | 选填 | 从第多少个群组开始拉取 |
GroupType | String | 选填 | 拉取哪种群组类型,例如 Public(陌生人社交群),Private(即新版本Work,好友工作群),ChatRoom (即新版本Meeting,会议群),AVChatRoom(直播群),Community(社群),不填为拉取所有 |
ResponseFilter | Object | 选填 | |
SupportTopic | Integer | 选填 | 指定查询的是否为支持话题的群组,1表示支持,0表示不支持。如果指定了此字段,则 GroupType 字段必须为 Community |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TotalCount": 2, // 不论Limit和Offset如何设置,该值总是满足条件的群组总数"GroupIdList": [{"GroupId": "@TGS#2J4SZEAEL"},{"GroupId": "@TGS#2C5SZEAEF"}]}
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TotalCount": 1,"GroupIdList": [{"GroupId": "@TGS#2J4SZEAEL"}]}
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TotalCount": 2,"GroupIdList": [{"GroupId": "@TGS#16UMONKGG","Introduction": "","Name": "d","Notification": "","SelfInfo": {"JoinTime": 1588148506,"Role": "Member"},"Type": "Private"},{"GroupId": "@TGS#3FCOX2MGW","Introduction": "","Name": "TestGroup","Notification": "","SelfInfo": {"JoinTime": 1588041114,"Role": "Member"},"Type": "ChatRoom"}]}
{"ActionStatus": "OK","ErrorInfo": "ok","ErrorCode": 0,"TotalCount": 1,"GroupIdList": [{"GroupId": "@TGS#_@TGS#cMOQ7HIM62CD","Type": "Community","SupportTopic": 1,"GrossTopicNextMsgSeq": 3,"SelfInfo": {"GrossTopicReadSeq": 2}}]}
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TotalCount": 1, // 不论 Limit 和 Offset 如何设置,该值总是满足条件的群组总数"GroupIdList": [{"ApplyJoinOption": "DisableApply","CreateTime": 1585718204,"FaceUrl": "","GroupId": "@TGS#16UMONKGG","Introduction": "","LastInfoTime": 1588148506,"LastMsgTime": 0,"MaxMemberNum": 200,"MemberNum": 1,"Name": "d","NextMsgSeq": 2,"Notification": "","Owner_Account": "","SelfInfo": {"JoinTime": 1588148506,"MsgFlag": "AcceptAndNotify","Role": "Member","MsgSeq": 1},"MuteAllMember": "Off","Type": "Private"}]}
字段 | 类型 | 说明 |
ActionStatus | String | 请求处理的结果,OK 表示处理成功,FAIL 表示失败 |
ErrorCode | Integer | 错误码,0表示成功,非0表示失败 |
ErrorInfo | String | 错误信息 |
TotalCount | Integer | 用户所加入的群组个数 |
GroupIdList | Array |
错误码 | 含义说明 |
10002 | 系统错误,请再次尝试或联系技术客服 |
10003 | 请求命令非法,请再次尝试或联系技术客服 |
10004 | 参数非法。请根据应答包中的 ErrorInfo 字段,检查必填字段是否填充,或者字段的填充是否满足协议要求 |
10018 | 应答包长度超限。因为请求的内容过多,导致应答包超过了最大包长(1MB),请尝试减少单次请求的数据量 |
本页内容是否解决了您的问题?