logo
In-app Chat
ZIMAudio
On this page

UserRegister

POST

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

Backend registration. Developers can use this API to batch register IM accounts for users to enable message reception, so that users can receive historical messages after logging in to ZIM. Commonly used in education scenarios.

QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [UserRegister]

    API prototype parameter

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

    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
    UserInfo object[]required
    Possible values: <= 100
    User information. A maximum of 100 users can be registered at a time.
  • Array[
  • UserId stringrequired

    Possible values: <= 32 characters

    User ID, with a maximum length of 32 bytes.

    Note

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

    UserName string

    Possible values: <= 256 characters

    User name, with a maximum length of 256 bytes.

    UserAvatar string

    Possible values: <= 500 characters

    User avatar URL, with a maximum length of 500 bytes.

  • ]

Responses

OK
Schema
    Code integer

    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.

    Note

    When you initiate a request to register multiple users at the same time:

    • If 1 or more user IDs are successfully registered, Code will return 0. In this case, please refer to the specific information in ErrorList to confirm the operation result.
    • If all users fail to be registered, Code will return the relevant return code. For details, please refer to Global Return Codes.
    Code / SubCodeDescriptionPossible CauseSuggested Solution
    660000001General business error.Server error.Please retry or contact ZEGOCLOUD Technical Support.
    660000002Input parameter error。Input parameters are missing or invalid.Please check the input parameters。
    660000012UserID length exceeds the limit.The maximum length of UserID is 32 bytes.Please confirm the length of UserID.
    660700001Requests are too frequent.Request frequency exceeds 20 times/s.Please try again later.
    660700002User already exists.The UserID of the request already exists.Please avoid registering the same UserID repeatedly.
    660700006UserName length exceeds the limit.The maximum length of UserName is 256 bytes.Please confirm the length of UserName.
    660700007UserAvatar URL length exceeds the limit.The maximum length of UserAvatar URL is 500 bytes.Please confirm the length of UserAvatar.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    ErrorList object[]
    Failure information list.
    • Code is 0:
    • ErrorList is empty, all users are successfully registered.
    • ErrorList is not empty, indicating that some users failed to register. Please refer to SubCode and SubMessage 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 users failed to register and all are existing users.
  • Array[
  • UserId string

    UserID that failed to register.

    SubCode number

    Specific return code for user registration failure. For complete return codes, please refer to the Code description or Global Return Codes.

    SubMessage string

    Reason for user registration failure.

  • ]

Previous

Query group information of user joined

Next

Modify user information

On this page

Back to top