Browse SDKs · React Native
Platform
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

ParameterTypeRequiredDescription
groupIDstringYesID of the group to update.
groupNamestringNoNew group name.
introductionstringNoNew group description.
faceURLstringNoURL 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.