logo
In-app Chat
ZIMAudio
On this page

QueryGroupMemberList

POST

https://zim-api.zego.im/

Get the user list in a group based on the group ID.

Note
The group ID can be obtained through Query the group list in the App.
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [QueryGroupMemberList]

    API prototype parameter

    https://zim-api.zego.im/?Action=QueryGroupMemberList

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature example for how to generate.

    Timestamp int64required

    💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature example for how to generate, with a maximum error of 10 minutes.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    Signature stringrequired

    💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.

Body

required
    GroupId stringrequired

    Possible values: <= 32 characters

    Group ID. Only supports numbers, English characters, and '!','#','$','%','&','(',')','+',' -',':',';','<','=','.','>','?','@','[',']','^','_','{','}','|','~'.

    Limit number

    Possible values: >= 0 and <= 1000

    Number of members to retrieve at once, with a value range of [0, 1000], meaning this API can return a maximum of 1,000 members per call.

    When the number of members in the group exceeds the Limit, you need to call this API multiple times and the Limit must remain consistent.

    If empty or greater than 1,000, the default value is 1,000.

    Next number

    Pagination flag. Fill in 0 for the first time, and then fill in the Next value returned last time.

    For example, if there are 2,500 members in the group, when calling this API to query the group member list:

    • First call: Set Limit to 1,000 and Next to 0 to query members 1 to 1,000; the Next value in the returned result is 1.
    • Second call: Set Limit to 1,000 and Next to 1 to query members 1,001 to 2,000; the Next value in the returned result is 2.
    • Third call: Set Limit to 1,000 and Next to 2 to query members 2,001 to 2,500; the query is complete, and the Next value in the returned result is 0.

Responses

OK
Schema
    Code number

    Return code.

    The following only lists the return codes related to the API business logic. For the complete return codes, please refer to Return codes.

    Return codeDescriptionSuggested Solution
    660000002Parameter error.Please refer to Request and input the correct parameters.
    660600001Group does not exist.Please confirm if the GroupId is correct.
    660600003Error querying group member list.Please contact ZEGOCLOUD Technical Support.
    660600004Call frequency exceeds the limit.The call frequency is 20 times/s, please do not exceed the limit.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    TotalCount number

    Total number of group members when the server starts the query.

    Next number

    Pagination flag. A non-zero value indicates that the list retrieval is not complete.

    Note

    Apart from the above description, this field has no association with the list information. Please do not base any other logic on this field.

    MemberList object[]
    Collection of group member information.
  • Array[
  • UserId string

    Group member ID.

    UserName string

    Group member name.

    UserNickName string

    User's nickname in the group.

  • ]

Previous

Query group list in the app

Next

Remove group members

On this page

Back to top