logo
In-app Chat
ZIMAudio
On this page

QueryUserInfos

POST

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

Query user information by user ID, including user name, user avatar, and extended field.

QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [QueryUserInfos]

    API prototype parameter

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

    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
    UserIds string[]required

    Possible values: <= 100

    User ID list to query (who have logged in to the ZIM service by calling the login method on the client, or have completed registration by calling the server-side API). A maximum of 100 user IDs can be queried. Each user ID does not exceed 64 bytes.

    Note

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

Responses

OK
Schema
    Code number

    Return code.

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

    Code / SubCodeDescriptionSuggested Solution
    660000001General business error.Please retry or contact ZEGOCLOUD Technical Support.
    660000002Non-existent user ID, or the user has logged out.Please check the input parameters。
    660300005The API call frequency exceeds the AppID-level limit.Please try again later.
    660700008Error getting user information.Please check if the user ID is correct, or contact ZEGOCLOUD Technical Support.
    660700015User is not registered.Please register the user first.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    Result object[]
    Query success result.
  • Array[
  • UserId string

    User ID that was successfully queried.

    UserName string

    User name.

    UserAvatar string

    User avatar URL.

    Extra string

    Extended field.

  • ]
  • ErrorList object[]
    Query failure list. Returned through this field when the user ID does not exist or the user has logged out.
    • Code is 0:
    • ErrorList is empty, all user online statuses are successfully queried.
    • ErrorList is not empty, indicating that some user online status queries failed. Please refer to SubCode for processing.
    • Code is not 0:
    • ErrorList is empty, indicating parameter error, API frequency limit, or system error.
    • ErrorList is not empty, indicating that all user online status queries failed.
  • Array[
  • UserId string

    User ID that failed to be queried.

    SubCode number

    Return code when query fails. For complete return codes, please refer to the Code description or Global Return Codes.

  • ]

Previous

Query users online status

Next

Query group information of user joined

On this page

Back to top