SDKsReact Native
Invite users to a group
OpenIM React Native SDK guide for invite users to a group.
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
| Parameter | Type | Required | Description |
| --- | --- | --- |
| groupID | string | Yes | ID of the target group. |
| reason | string | Yes | Invitation message. Pass an empty string when no message is needed. |
| userIDList | string[] | Yes | User 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.
Was this page helpful?