Browse SDKs · Flutter
Platform
SDKsFlutter

Join a group

Apply to join or directly join an OpenIM group using the Flutter SDK.

Copy

Apply to join a public or specified group:

Parameters

ParameterTypeRequiredDescription
groupIDStringYesTarget group ID.
reasonString?NoApplication note or verification message.
joinSourceintYesJoin origin source: 2 invited by group member, 3 searched by group ID or name, 4 scanned group QR code.

Code example

await OpenIM.iMManager.groupManager.joinGroup(
  groupID: groupID,
  reason: 'Requesting to join the project team',
  joinSource: 3,
);

Return value

A successful Future indicates that the request was submitted. If the group allows direct entry without verification, the user becomes a member immediately; if approval is required, the request awaits review by a group owner or administrator.

State changes after the call

Once the user is admitted to the group, the SDK emits join group notifications. The client adds the group to its local joined group roster using groupID as the key. For complete listener integration, see Groups overview. To track application records, see Group applications overview.