logo
In-app Chat
ZIMAudio
On this page

SetGroupMembersNickname

POST

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

By calling this API, you can batch modify the nicknames of members in a group. By default, you can modify the nicknames of up to 20 users at a time. If you need to adjust this, please contact ZEGOCLOUD Technical Support.

After the nickname is successfully set, group members will receive relevant notifications through the following ZIM SDK callback interfaces:

iOSAndroidmacOSWindows
groupMemberInfoUpdatedonGroupMemberInfoUpdatedgroupMemberInfoUpdatedonGroupMemberInfoUpdated
WebMini ProgramFlutterReact Native
groupMemberInfoUpdatedgroupMemberInfoUpdatedonGroupMemberInfoUpdatedgroupMemberInfoUpdated
Unity3Duni-app | uni-app xHarmonyOS
OnGroupMemberInfoUpdatedgroupMemberInfoUpdatedgroupMemberInfoUpdated
Note
The users corresponding to the parameters FromUserId and UserId 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.
Note

The parameters FromUserId, GroupId, UserIds, and Nickname only support numbers, English characters, and '!','#','$','%','&','(',')','+','\'',':',';','<','=','.','>','?' ,'@','[',']','^','_','{','}','|','~'.

QPS Limit
1 time/s, group-level limit. If you need to adjust this, please contact ZEGOCLOUD Technical Support.

Request

Query Parameters

    Action stringrequired

    Possible values: [SetGroupMembersNickname]

    API prototype parameter

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

    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
    FromUserId stringrequired

    Possible values: <= 32 characters

    Operator user ID. The user must have registered with the ZIM service.

    GroupId stringrequired

    Possible values: <= 32 characters

    Group ID.

    UserIds object[]required
    List of users whose nicknames need to be set.
  • Array[
  • UserId stringrequired

    Possible values: <= 32 characters

    User ID.

    Nickname stringrequired

    Possible values: <= 256 characters

    User's nickname in the group.

  • ]

Responses

OK
Schema
    Code number

    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
    660000002Input parameter error.Please check the input parameters.
    660000011Number of users exceeds the limit.Please check the input user list.
    660300006Frequency limit.Please try again later or understand the relevant frequency limits.
    660500002Operator user is not registered.Please have the operator register with the ZIM service first.
    660600001Group does not exist.Please confirm if the input GroupID is correct.
    Message string

    Description of the operation result.

    RequestId string

    Request ID.

    ErrorUsers object[]
    Information about users whose nickname setting failed.
    • When Code is 0:
    • If ErrorUsers is empty, all specified user nicknames were set successfully.
    • If ErrorUsers is not empty, it means some specified user nicknames failed to be set. Please refer to SubCode for handling.
    • When Code is not 0:
    • If ErrorUsers is empty, it indicates parameter error, API frequency limit, or system error.
    • If ErrorUsers is not empty, it means all specified user nicknames failed to be set.
  • Array[
  • UserId string

    Failed user ID.

    SubCode number

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

  • ]

Previous

Add group members

Next

Set group member roles

On this page

Back to top