In-app Chat
  • iOS : Objective-C
  • Android
  • Web
  • Flutter
  • React Native
  • Unity3D
  • Windows
  • macOS
  • Introduction
    • Overview
    • Basic concepts
  • Sample app
  • Getting started
  • Client SDKs
    • SDK downloads
    • Release notes
    • Upgrade guide
  • Guides
    • Authentication
    • Manage users
    • Room
    • Group
    • Messaging
    • Call invitation (signaling)
    • Manage sessions
  • Offline push notifications
  • Error codes
  • Client APIs
  • Server APIs
  • Documentation
  • In-app Chat
  • Server APIs
  • Group related
  • Query group list in the app

Query group list in the app

Last updated:2024-04-16 10:57

Description

Get the IDs of all groups in the app.

Operation prototype

  • Request method: GET
  • Request endpoint: https://zim-api.zego.im/?Action=QueryAppGroupList
  • Protocol: HTTPS
  • Rate limit: 1 request/second

Request parameters

Listed below are the parameters specific to this request and part of the public request parameters. For the complete list of public request parameters, see Accessing Server APIs - Public parameters.

Parameter Type Required Description
Limit
Number
No
The number of group IDs obtained in a single request. The value range is [0, 10000], that is, up to 10000 group IDs can be returned in a single call to this interface.

When the number of groups in the App exceeds the Limit, this interface needs to be called multiple times.

If the number filled in exceeds 10000 or is not filled in, the default value is the maximum value of 10000.

Next
Number
No
The paging pull flag. Fill in 0 for the first time, and fill in the value returned last time later. Next returned as 0 indicates that the list of group members has been obtained.

For example, if there are 25000 groups in the App and you want to query the group list using this interface:

  • Call this interface for the first time, fill in 10000 for Limit, and fill in 0 for Next to query the first 1-10000 groups; the value of Next in the returned result is 1.
  • Call this interface for the second time, fill in 10000 for Limit, and fill in 1 for Next to query the 10001-20000 groups; the value of Next in the returned result is 2.
  • Call this interface for the third time, fill in 10000 for Limit, and fill in 2 for Next to query the 20001-25000 groups; the query is complete, and the value of Next in the returned result is 0.

Sample request

  • Sample request URL:

    https://zim-api.zego.im/?Action=QueryAppGroupList
    &Limit=1000
    &Next=0
    &<Common Request Parameters>

Response parameters

Parameter Type Description
Code
Number
The return code.
Message
String
The explanation information of the request result.
RequestId
String
The request ID.
TotalCount
Number
The total number of groups in the App.
Next
Number
The flag for paging pull.
GroupIdList
Array of String
The set of group IDs obtained.
GroupId
String
The ID of the group.
GroupName
String
The name of the group.

Sample response

{
   "Code": 0,
   "Message": "success",
   "RequestId": "343649807833778782",
   "TotalCount": 1680,
   "Next": 168,
   "GroupIdList": [
      {
         "GroupId": "groupA",
         "GroupName": "groupNameA"
      },
      {
         "GroupId": "groupB",
         "GroupName": "groupNameB"
      }
   ]
}

Return codes

Return code Description Processing Suggestions
660000002
Parameter error.
Please refer to the request parameters and input the correct parameters.
660600006
Error in querying the list of groups.
Please contact ZEGOCLOUD technical support.
660600007
The frequency of calling the QueryAppGroupList interface exceeds the limit.
The rate limit is 1 request/second. Please do not exceed the limit.
Page Directory