logo
In-app Chat
ZIMAudio
On this page

QueryRoomMembers

GET

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

Query whether users are in the specified room. By default, batch queries of up to 10 users are supported. If you need to adjust this, please contact ZEGOCLOUD Technical Support.

QPS Limit
5 times/s, room-level limit

Request

Query Parameters

    Action stringrequired

    Possible values: [QueryRoomMembers]

    API prototype parameter

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

    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.

    UserId string[]required

    Possible values: <= 10

    List of user IDs to query. By default, a maximum of 10 user IDs can be queried.

    Note

    UserId has a maximum length of 32 bytes, RoomID has a maximum length of 128 bytes. Both only support numbers, English characters, and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', ' ', '{', '}', '|', '~'.

    Example: UserId[]=a&UserId[]=b&UserId[]=c&UserId[]=d

    RoomId stringrequired

    Possible values: <= 32 characters

    Room ID.

Responses

OK
Schema
    Code integer

    Return code.

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

    Code / SubCodeDescriptionSuggested Solution
    660000002Parameter errorPlease check the input parameters
    660000011Number of users exceeds the limit.Please check the input user list.
    660200001User not registeredPlease confirm if the user ID exists or if the user has logged out of the ZIM service.
    660300006Call frequency exceeds the limit.Please try again later.
    660300012User is not in the roomNo action required.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    UserList object[]
    Query result, i.e., the list of users in the specified room.
  • Array[
  • user_id string

    ID of the user in the specified room.

    user_name string

    Name of the user in the specified room.

    avatar stringnullable

    User avatar information, can be null.

    extra stringnullable

    Extended information, can be null.

  • ]
  • ErrorList object[]
    List of users not in the specified room.
    • When Code is 0:
    • If ErrorList is empty, all users are in the specified room.
    • If ErrorList is not empty, it means some users are not in the specified room. Please refer to SubCode for handling.
    • When Code is not 0:
    • If ErrorList is empty, it indicates parameter error, API frequency limit, or system error.
    • If ErrorList is not empty, it means all users are not in the specified room.
  • Array[
  • UserId string

    ID of the user not in the specified room.

    SubCode number

    Return code for the reason the user is not in the specified room. For the complete return codes, please refer to the Code description or Return codes.

  • ]

Previous

Remove users from a room

Next

Create a group

On this page

Back to top