logo
In-app Chat
ZIMAudio
On this page

ModifyUserInfo

POST

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

Through this API, you can modify user profile information, including user nickname, avatar, etc.

After successfully modifying user profile, related users receive user profile modification notifications through the following ZIM SDK callback interface:

iOSAndroidmacOSWindows
userInfoUpdatedonUserInfoUpdateduserInfoUpdatedonUserInfoUpdated
WebMini ProgramFlutterUnity3D
userInfoUpdateduserInfoUpdatedonUserInfoUpdatedOnUserInfoUpdated
uni-app | uni-app xReact NativeHarmonyOS
userInfoUpdateduserInfoUpdateduserInfoUpdated
Note
QPS Limit: 20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [ModifyUserInfo]

    API prototype parameter

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

    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
    List of users whose profiles are to be modified. A maximum of 100 users can be modified at a time.
  • Array[
  • UserId stringrequired

    Possible values: <= 32 characters

    Modify the profile of this user ID (who has logged in to the ZIM service by calling the login method on the client, or has completed registration by calling the server-side API).

    UserName string

    Possible values: <= 256 characters

    New user name, with a maximum length of 256 bytes.

    UserAvatar string

    Possible values: <= 500 characters

    New avatar, with a maximum length of 500 bytes.

    Extra string

    User extended information. Default length is 2 KB. If you need to increase the limit, please contact ZEGOCLOUD Technical Support. Maximum is 32 KB.

  • ]

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.

    Code / SubCodeDescriptionSuggested Solution
    660000002Parameter error.Please refer to the request parameters and enter the correct parameters.
    660300005The API call frequency exceeds the AppID-level limit.Please try again later.
    660700012User is not registered.Please register the user first.
    660700013Error querying user information.Please contact ZEGOCLOUD Technical Support.
    660700016Error synchronizing user information.Please contact ZEGOCLOUD Technical Support.
    660700017Error updating user information.Please contact ZEGOCLOUD Technical Support.
    Message string

    Operation result description.

    RequestId string

    Request ID.

    ErrorList object[]
    Failure information list.
    • Code is 0:
    • ErrorList is empty, all user profiles are successfully modified.
    • ErrorList is not empty, indicating that some user profiles failed to be modified. 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 user profiles failed to be modified.
  • Array[
  • UserId string

    User ID whose profile failed to be modified.

    SubCode number

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

    SubMessage string

    Reason for user profile modification failure.

  • ]

Previous

Register users

Next

Add friends

On this page

Back to top