Group Type ID | RESTful API Support |
Private | Yes. Same as work groups (Work) in the new version. The information of work groups that the user has joined but are not activated is not returned by default. |
Public | Yes |
ChatRoom | Yes. Same as meeting groups (Meeting) in the new version. |
AVChatRoom | Yes. The information of audio-video groups (AVChatRoom) that the user has joined is not returned by default. If you specify to pull audio-video group information, the obtained group information may not be complete. Audio-video groups do not store all group member data. |
Community | Yes |
https://xxxxxx/v4/group_open_http_svc/get_joined_group_list?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Parameter | Description |
xxxxxx | Domain name corresponding to the country/region where your SDKAppID is located. China: console.tim.qq.com Singapore: adminapisgp.im.qcloud.com Seoul: adminapikr.im.qcloud.com Frankfurt: adminapiger.im.qcloud.com Silicon Valley: adminapiusa.im.qcloud.com Jakarta: adminapiidn.im.qcloud.com |
v4/group_open_http_svc/get_joined_group_list | Request API |
sdkappid | SDKAppID assigned by the Chat console when an app is created |
identifier | |
usersig | |
random | A random 32-bit unsigned integer ranging from 0 to 4294967295. |
contenttype | Request format, which should always be json . |
{"Member_Account": "leckie"}
Limit
and Offset
fields to control the pagination mode:Limit
field specifies the maximum number of groups in GroupIdList
in the response packet, which cannot exceed 5,000.Offset
field specifies the sequence number of the group in the entire group list, starting from which the information is read. Offset is 0 by default. If pagination is requested (the page number starts from 1), the Offset
value of each page should be: (Page number – 1) × Number of groups displayed on each page.
For example, to display 20 group members on each page, the request parameters for the first page should be {"Limit": 20, "Offset": 0}
, the request parameters for the second page should be {"Limit": 20, "Offset": 20}
, and so on.Limit
or Offset
does not affect TotalCount
in the response packet.{"Member_Account": "leckie","Limit": 10, // Number of groups to be pulled. If this field is not specified, all groups will be pulled."Offset": 0 // Sequence number of the group starting from which information is pulled.}
{"Member_Account": "leckie","GroupType" : "Public" // Type of groups to be pulled. If this parameter is not specified, all types of groups will be pulled.}
GroupBaseInfoFilter
.
To specify the group member information in the group that needs to be pulled, set SelfInfoFilter
. {"Member_Account": "leckie","WithHugeGroups":1, // Supports pulling the information of audio-video groups (AVChatRoom)."WithNoActiveGroups":1,// Supports pulling the information of Private groups (same as Work groups in the new version) that the user has joined but are not activated."Limit": 10, // Number of groups to be pulled. If this field is not specified, all groups will be pulled."Offset": 0, // Sequence number of the group starting from which information is pulled."ResponseFilter": {"GroupBaseInfoFilter": [ // Basic information fields to be pulled"Type","Name","Introduction","Notification"],"SelfInfoFilter": [ // Member's personal information in the group"Role", // Role in the group"JoinTime" // Time when the member joined the group]}}
{"Member_Account": "107867",// User account to be queried (required)"SupportTopic": 1// Whether the specified group type supports topics. This field is supported only by community groups.}
{"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"]}}
Field | Type | Required | Description |
Member_Account | String | Yes | User account to be queried |
WithHugeGroups | Integer | No | Whether to pull the information of audio-video groups (AVChatRoom) that the user has joined. 0 : No (default value); 1 : Yes |
WithNoActiveGroups | Integer | No | Whether to pull the information of Private groups (same as Work groups in the new version) that the user has joined but are not activated. 0 : No (default value); 1 : Yes |
Limit | Integer | No | Number of groups pulled each time. If no value is specified, all groups will be pulled. |
Offset | Integer | No | Sequence number of the group starting from which information is pulled. |
GroupType | String | No | Type of groups to be pulled, for example, Public (social networking group for strangers), Private (same as Work groups in the new version), ChatRoom (same as Meeting groups in the new version), AVChatRoom (audio-video groups), and Community. If no value is specified, all types of groups are pulled. |
ResponseFilter | Object | No | It contains two filters: GroupBaseInfoFilter and SelfInfoFilter . GroupBaseInfoFilter specifies the basic information fields to pull. For more information, see Group basic information. SelfInfoFilter specifies members' personal information to be pulled from groups. For more information, see Group member profile. |
SupportTopic | Integer | No | Whether the specified group type supports topics. 1 : Yes; 0 : No. If this field is specified, GroupType must be Community . |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TotalCount": 2, // This value is the total number of groups that meet the conditions, regardless of the `Limit` and `Offset` settings."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, // This value is the total number of groups that meet the conditions, regardless of the `Limit` and `Offset` settings."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"}]}
Field | Type | Description |
ActionStatus | String | Request result. OK : successful; FAIL : failed |
ErrorCode | Integer | Error code. 0 : Successful; other values: Failed |
ErrorInfo | String | Error information |
TotalCount | Integer | Number of groups that the user has joined |
GroupIdList | Array | Group information pulled. The returned result is the information filtered based on the filtering fields set in the filter. For more information on the fields, see Group Data Structure. |
ErrorCode
and ErrorInfo
respectively.
For public error codes (60000 to 79999), see Error Codes.
The following table describes the error codes specific to this API:Error Code | Description |
10002 | A system error occurred. Try again or contact technical support. |
10003 | The request command is invalid. Try again or contact technical support. |
10004 | A parameter is invalid. Check the ErrorInfo field in the response packet to see whether the required fields have been specified or whether the fields are set according to protocol requirements. |
10018 | The response packet length exceeds the maximum packet length of 1 MB because too much content was requested. Try to reduce the amount of data requested at a time. |
この記事はお役に立ちましたか?