logo
In-app Chat
Powered Byspreading
On this page

Query group list in the app


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.

ParameterTypeRequiredDescription
LimitNumberNo

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.

NextNumberNoThe 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:

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

Response parameters

ParameterTypeDescription
CodeNumberThe return code.
MessageStringThe explanation information of the request result.
RequestIdStringThe request ID.
TotalCountNumberThe total number of groups in the App.
NextNumberThe flag for paging pull.
GroupIdListArray of StringThe set of group IDs obtained.
└GroupIdStringThe ID of the group.
└GroupNameStringThe name of the group.

Sample response

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

Return codes

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

Previous

Modify group specification limits

Next

Query group member list