SDKsFlutter
Join a group
Apply to join or directly join an OpenIM group using the Flutter SDK.
Apply to join a public or specified group:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | String | Yes | Target group ID. |
reason | String? | No | Application note or verification message. |
joinSource | int | Yes | Join 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.
Was this page helpful?