logo
In-app Chat
ZIMAudio
On this page

UpdateGroupData

POST

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

By calling this API, you can modify group data information, including group avatar, group name, group notice, etc.

After successfully modifying the group data, group members can receive group data modification notifications through the following ZIM SDK callback interfaces:

iOSAndroidmacOSWindows
groupNameUpdatedonGroupNameUpdatedgroupNameUpdatedonGroupNameUpdated
WebMini ProgramFlutterReact Native
groupNameUpdatedgroupNameUpdatedonGroupNameUpdatedgroupNameUpdated
Unity3Duni-app | uni-app xHarmonyOS
OnGroupNameUpdatedgroupNameUpdatedgroupNameUpdated
Note
Since the parameters GroupAvatar, GroupName, and GroupNotice support being set to empty strings, if you do not need to modify a certain field mentioned above, the JSON string cannot contain the field name (cannot pass empty), otherwise it will be considered as an empty string and the original content will be deleted.
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [UpdateGroupData]

    API prototype parameter

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

    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 ID who modifies the group data (registered).

    GroupId stringrequired

    Possible values: <= 32 characters

    Group ID whose data is to be modified.

    GroupAvatar string

    Possible values: <= 500 characters

    Group avatar URL, with a length limit of 500 characters.

    Note

    At least one of group avatar, group name, and group notice is required.

    GroupName string

    Possible values: <= 50 characters

    Group name, with a length limit of 50 characters.

    GroupNotice string

    Possible values: <= 300 characters

    Group notice, with a length limit of 300 characters.

Responses

OK
Schema
    Code number

    Return code.

    The following only lists the return codes related to the API business logic. For the complete return codes, please refer to Return codes.

    Return codeDescriptionSuggested Solution
    660000002Parameter error.Please refer to Request and enter the correct parameters.
    660300006The API call frequency exceeds the group/room limit.Please try again later.
    660500002FromUserId is not registered.Please register FromUserId first.
    660600001Group does not exist.Please confirm if the GroupId is correct.
    660600009Failed to obtain group-related information.Please confirm if the GroupID is correct first. If correct, please contact Technical Support.
    660600028Failed to modify group data.Please contact ZEGOCLOUD Technical Support.
    Message string

    Description of the operation result.

    RequestId string

    Request ID.

Previous

Create a group

Next

Modify group attributes

On this page

Back to top