Browse SDKs · React Native
SDKsReact Native

Update group profile

OpenIM React Native SDK guide for update group profile.

Copy

Call setGroupInfo() to update a group name, description, or avatar. Provide only the fields that need to change.

await OpenIMSDK.setGroupInfo({
  groupID,
  groupName: groupName.trim(),
  introduction: introduction.trim(),
  faceURL,
});

Parameters

| Parameter | Type | Required | Description | | --- | --- | --- | | groupID | string | Yes | ID of the group to update. | | groupName | string | No | New group name. | | introduction | string | No | New group description. | | faceURL | string | No | URL of the new group avatar. |

In addition to groupID, provide at least one group profile field to update. Fields that are not provided keep their current values.

Return value

When the call completes, the group profile is updated. Group profile changes trigger OnGroupInfoChanged; see Group overview for event handling.