Browse SDKs · Flutter
Platform
SDKsFlutter

Invite users to group

Invite users to join an OpenIM group using the Flutter SDK.

Copy

Group members or administrators can invite a list of users to join a group. Enforce entry point controls in the UI based on group settings; final authorization and verification logic are handled by the server:

Parameters

ParameterTypeRequiredDescription
groupIDStringYesTarget group ID.
reasonStringYesInvitation description or application note.
userIDListList<String>YesList of user IDs invited to join the group.

Code example

await OpenIM.iMManager.groupManager.inviteUserToGroup(
  groupID: groupID,
  reason: 'Join project discussion',
  userIDList: selectedUserIDs,
);

Return value

A successful Future indicates that the invitation request was accepted by the server. Depending on the group's join verification policy, users are either admitted immediately or an application record is created for review.

State changes after the call

When users join directly, connected clients receive onGroupMemberAdded event notifications. Use groupID:userID as the key to merge new members into the local roster. For complete listener integration, see Retrieving group members overview.