Browse SDKs · React Native
Platform
SDKsReact Native

Invite users to a group

OpenIM React Native SDK guide for invite users to a group.

Copy

Call inviteUserToGroup() to invite one or more users to a group.

await OpenIMSDK.inviteUserToGroup({
  groupID: 'group-001',
  reason: 'Invitation to join the project discussion group',
  userIDList: ['user-002', 'user-003'],
});

Parameters

ParameterTypeRequiredDescription
groupIDstringYesID of the target group.
reasonstringYesInvitation message. Pass an empty string when no message is needed.
userIDListstring[]YesUser IDs to invite.

When the call completes, the invitation request is submitted. When a user actually joins the group, OnGroupMemberAdded is triggered; see Get group members for event handling.