please select
  • UIKit
  • SDK
  • Server APIs
Chat/
Server APIs/
RESTful APIs/
Group Related/
Group Management/
Server APIs
  • Generating UserSig
  • RESTful APIs
    • RESTful API Overview
    • RESTful API List
    • Message Related
      • Send Message
        • Sending One-to-One Messages to One User
        • Sending One-to-One Messages to Multiple Users
        • Sending Ordinary Messages in a Group
        • Sending System Messages in a Group
        • Broadcast Message of Audio-Video Group
        • Importing One-to-One Messages
        • Importing Group Messages
      • Historical Message
        • Modifying Historical One-to-one Messages
        • Modifying Historical Group Messages
        • Pulling Historical One-to-one Messages
        • Pulling Historical Group Messages
      • Delete Message
        • Deleting Messages Sent by a Specified User
      • Withdraw Message
        • Recalling One-to-One Messages
        • Recalling Group Messages
      • Read Receipt
        • Marking One-to-One Messages as Read
        • Pulling Group Message Read Receipt Details
        • Pulling Read Receipts for Group Messages
      • Message Extension
        • Pulling the Message Extension of a One-to-One Message
        • Configuring Message Extension for a One-to-One Message
        • Pulling Message Extension of a Group Message
        • Configuring Message Extension for a Group Message
      • Pushing to All Users
        • API for Pushing to All Users
        • Pushing to All Users
        • Setting Application Attribute Names
        • Getting Application Attribute Names
        • Getting User Attributes
        • Setting User Attributes
        • Deleting User Attributes
        • Getting User Tags
        • Adding User Tags
        • Deleting User Tags
        • Deleting All Tags of a User
    • Session Related
      • Conversation List
        • Pulling a conversation list
      • Session Unread Count
        • Setting the Unread Message Count of a Member
        • Querying Unread One-to-One Message Count
      • Delete Session
        • Deleting a conversation
      • Session Grouping Tag
        • Creating Conversation Group Data
        • Updating Conversation Group Data
        • Deleting Conversation Group Data
        • Creating or Updating Conversation Mark Data
        • Searching for Conversation Group Marks
        • Pulling Conversation Group Mark Data
    • Group Related
      • Group Management
        • Getting All Groups in an App
        • Creating a Group
        • Disbanding a Group
        • Getting the Groups a User Has Joined
      • Group Information
        • Getting Group Profiles
        • Modifying the Profile of a Group
        • Importing a Group Profile
      • Group Member Management
        • Adding Group Members
        • Deleting Group Members
        • Banning Group Members
        • Unbanning Group Members
        • Bulk Muting and Unmuting
        • Getting the List of Muted Group Members
        • Changing Group Owner
        • Querying the Roles of Users in a Group
        • Importing Group Members
      • Group Member Information
        • Getting Group Member Profiles
        • Modifying the Profile of a Group Member
      • Group Custom Attributes
        • Getting Group Custom Attributes
        • Modifying Group Custom Attributes
        • Clearing Group Custom Attributes
        • Resetting Group Custom Attributes
        • Deleting Group Custom Attributes
      • Live Group Management
        • Getting the Number of Online Users in an Audio-Video Group
        • Getting the List of Online Members in Audio-Video Group
        • Setting Audio-Video Group Member Marks
        • Getting the List of Banned Group Members.
      • Community Management
        • Creating Topic
        • Deleting Topic
        • Getting Topic Profile
        • Modifying Topic Profile
        • Importing Topic Profiles
      • Group Counter
        • Getting Group Counters
        • Updating Group Counters
        • Deleting Group Counters
    • User Management
      • Account Management
        • Importing a Single Account
        • Importing Multiple Accounts
        • Deleting Accounts
        • Querying Accounts
      • User Information
        • Setting Profiles
        • Pulling Profiles
      • User Status
        • Invalidating Account Login States
        • Querying Account Online Status
      • Friend Management
        • Adding Friends
        • Importing Friends
        • Updating Friends
        • Deleting Friends
        • Deleting All Friends
        • Verifying Friends
        • Pulling Friends
        • Pulling Specified Friends
      • Friend Lists
        • Adding Lists
        • Deleting Lists
        • Pulling Lists
      • Blocklist
        • Blocklisting Users
        • Unblocklisting Users
        • Pulling a Blacklist
        • Verifying Users on a Blocklist
    • Global Mute Management
      • Setting Global Mute
      • Querying Global Mute
    • Operations Management
      • Pulling Operations Data
      • Downloading Recent Messages
      • Getting Server IP Addresses
    • Chatbots
      • Pulling Chatbot Accounts
      • Creating Chatbot Accounts
      • Deleting Chatbot Accounts
  • Webhooks
    • Webhook Overview
    • Webhook Command List
    • Operations Management Callbacks
      • API Overclocking Alarm Callbacks
    • Online Status Webhooks
      • Status Change Webhooks
    • Relationship Chain Webhooks
      • After a Profile Is Updated
      • Before a Friend Is Added
      • Before a Friend Request Is Responded
      • After a Friend Is Added
      • After a Friend Is Deleted
      • After a User Is Added to Blocklist
      • After a User Is Removed from Blocklist
    • One-to-One Message Webhooks
      • Before a One-to-One Message Is Sent
      • After a One-to-One Message Is Sent
      • After a One-to-One message Is Marked as Read
      • After A One-to-One Message Is Recalled
    • Group Webhooks
      • Before a Group Is Created
      • After a Group Is Created
      • Before Applying to Join a Group
      • Before Inviting a User to a Group
      • After a User Joins a Group
      • After a User Leaves a Group
      • Before Group Message Is Sent
      • After a Group Message Is Sent
      • After a Group Is Full
      • After a Group Is Disbanded
      • After Group Profile Is Modified
      • Callback After Recalling Group Messages
      • Webhook for Online and Offline Status of Audio-Video Group Members
      • Webhook for Exceptions When Group Messages Are Sent
      • Before a Topic Is Created
      • After a Topic Is Created
      • After a Topic Is Deleted
      • Topic Profile Change Webhook
      • Callback After Group Member Profile Changed
      • Callback After Group Attribute Changed
      • Callback After Read Receipt
      • Callback After the Group Owner Changed
    • Webhook Mutual Authentication Configuration Guide
      • Apache Mutual Authentication Configuration
      • Nginx Mutual Authentication Configuration
    • Chatbot webhooks
      • Chatbot Passthrough Message Callback

Getting the Groups a User Has Joined

Feature Overview

This API is used by app admins to obtain the list of groups a certain user has joined. The information of work groups (Work) and audio-video groups (AVChatRoom) that the user has joined but are not activated is not pulled by default.

API Calling Description

Applicable group types

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
These are the preset group types in Chat. For more information, see Group System.

Sample request URL

https://xxxxxx/v4/group_open_http_svc/get_joined_group_list?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json

Request parameters

The following table describes the modified parameters when this API is called. For other parameters, see RESTful API Overview.
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
App admin account. For more information, see the App Admin section in Login Authentication.
usersig
Signature generated by the app admin account. For details, see Generating UserSig.
random
A random 32-bit unsigned integer ranging from 0 to 4294967295.
contenttype
Request format, which should always be json.

Maximum call frequency

200 calls per second

Sample request

Basic format A basic request is used to obtain the information about groups that a user has joined. The group information contains only the IDs of users in the group.
{
"Member_Account": "leckie"
}
Pulling by page You can use the Limit and Offset fields to control the pagination mode:
The Limit field specifies the maximum number of groups in GroupIdList in the response packet, which cannot exceed 5,000.
The 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.
The value of 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.
}
Specifying the group type You can specify the type of groups to be pulled, for example, Public (social networking group for strangers), Private (same as Work groups in the new version), and ChatRoom (same as Meeting groups in the new version). If AVChatRoom (audio-video group) is specified, you may obtain an incomplete list of members.
{
"Member_Account": "leckie",
"GroupType" : "Public" // Type of groups to be pulled. If this parameter is not specified, all types of groups will be pulled.
}
Pulling specified information To specify the basic information fields to be pulled, set 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
]
}
}

Pulling topic-enabled community groups
{
"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.
}
ALL IN ONE
{
"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"
]
}
}

Request fields

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.

Sample response

Basic or paged pull request
{
"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"
}
]
}
Specifying the group type
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0,
"TotalCount": 1,
"GroupIdList": [
{
"GroupId": "@TGS#2J4SZEAEL"
}
]
}
Pulling specified information
{
"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"
}
]
}
Pulling topic-enabled community groups
{
"ActionStatus": "OK",
"ErrorInfo": "ok",
"ErrorCode": 0,
"TotalCount": 1,
"GroupIdList": [
{
"GroupId": "@TGS#_@TGS#cMOQ7HIM62CD",
"Type": "Community",
"SupportTopic": 1,
"GrossTopicNextMsgSeq": 3,
"SelfInfo": {
"GrossTopicReadSeq": 2
}
}
]
}

ALL IN ONE
{
"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"
}
]
}

Response fields

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.

Error Codes

The returned HTTP status code for this API is always 200 unless a network error (such as error 502) occurs. The specific error code and details can be found in the response fields 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.

API Debugging Tool

Use the RESTful API online debugging tool to debug this API.