logo
In-app Chat
ZIMAudio
On this page

RobotRegister

POST

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

By calling this API, you can register multiple bots.

QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [RobotRegister]

    API prototype parameter

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

    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: <= 20
    List of bot user information. A maximum of 20 bots can be registered at a time.
  • Array[
  • UserId stringrequired

    Possible values: <= 32 characters

    Bot user ID. The length must not exceed 32 bytes and must start with @RBT#.

    UserName string

    Possible values: <= 256 characters

    Bot name. The length must not exceed 256 bytes.

    UserAvatar string

    Possible values: <= 500 characters

    Bot avatar URL. The length must not exceed 500 bytes.

  • ]

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.

    Note

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

    • If one or more bot 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 bot user IDs fail to register, Code will return the relevant return code. For details, please refer to Return codes.
    Code / SubCodeDescriptionPossible ReasonSuggested Solution
    660000001General business error.Server error.Please retry, or contact ZEGOCLOUD Technical Support.
    660000002Input parameter error.The input parameter is missing or invalid.Please check the input parameters.
    660300005The call frequency exceeds the AppID-level limit.Please try again later, or refer to the relevant documentation to understand the call frequency.
    660000012UserID length exceeds the limit.The maximum length of UserID is 32 bytes.Please confirm the length of UserID.
    660700001Request too frequent.The request frequency exceeds 20 times/second.Please try again later.
    660700002Bot already exists.The UserID in 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

    Operation result description.

    RequestId string

    Request ID.

    ErrorList object[]

    List of failure information.

    • When Code is 0:
    • If ErrorList is empty, all bot user IDs are successfully registered.
    • If ErrorList is not empty, it means some bot user IDs failed to register. Please refer to SubCode and SubMessage 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 bot user IDs failed to register. Please refer to SubCode and SubMessage for handling.
  • Array[
  • UserId string

    Bot user ID that failed to register.

    SubCode number

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

    SubMessage string

    Reason description for bot registration failure.

  • ]

Previous

Delete a conversation

Next

Obtain a license

On this page

Back to top