Overview
The group module lets backend services create and manage group chats, including group profiles, members, join requests, ownership transfer, dismissal, and mute controls.
Capability scope
| Capability | Description |
|---|---|
| Group management | Create groups, update group profiles, dismiss groups, and transfer ownership. |
| Group queries | Retrieve group profiles in batches and list groups joined by a user. |
| Join workflows | Apply to join, process applications, and query requests by group, user, or direction. |
| Member management | Invite, remove, or withdraw members; query member profiles and lists; and update member roles, nicknames, or extension data. |
| Moderation | Mute or unmute individual members and entire groups. |
| Application reminders and cleanup Enterprise | Get or clear application badge counts and delete sent or received group application records. |
Common APIs
- Create a group
- Get group information
- Update group information
- List joined groups
- Invite users to a group
- List group members
- Update group member information
- Mute a group member
- List received group applications
- Get the group application badge count Enterprise
Resource representations
GroupInfo
GroupInfo represents an OpenIM group.
| Field | Type | Description |
|---|---|---|
| groupID | string | Group ID. Supply it when creating a group or let the server generate it. |
| groupName | string | Group name. |
| notification | string | Group announcement. |
| introduction | string | Group introduction. |
| faceURL | string | Group avatar URL. |
| ownerUserID | string | Group owner user ID. |
| creatorUserID | string | Group creator user ID. |
| createTime | int64 | Creation time, normally a Unix timestamp in milliseconds. |
| memberCount | int | Number of group members. |
| status | int | Group status. See GroupStatus. |
| groupType | int | Group type. See GroupType. |
| needVerification | int | Join verification policy. See GroupVerification. |
| lookMemberInfo | int | Whether members may view other member profiles. |
| applyMemberFriend | int | Whether users may add friends from the member list. |
| notificationUpdateTime | int64 | Last announcement update time. |
| notificationUserID | string | User ID that last updated the announcement. |
| ex | string | Group extension data. |
| displayIsRead Enterprise | boolean | Whether group message read status is displayed. The server may disable it for large groups. |
| muteBypassUserIDs Enterprise | string[] | Users allowed to send while the group is muted. |
GroupMemberInfo
GroupMemberInfo represents a user's complete membership profile in a group.
| Field | Type | Description |
|---|---|---|
| groupID | string | Group ID. |
| userID | string | Member user ID. |
| nickname | string | Member nickname. |
| faceURL | string | Member avatar URL. |
| appMangerLevel | int | Application management level. The field name matches the server response. |
| roleLevel | int | Member role. See GroupMemberRole. |
| joinTime | int64 | Time when the member joined. |
| joinSource | int | How the member joined. See JoinSource. |
| operatorUserID | string | User that invited, imported, or approved the member. |
| muteEndTime | int64 | Time when the member mute expires. |
| inviterUserID | string | Inviter user ID. |
| ex | string | Group member extension data. |
GroupRequestInfo
GroupRequestInfo represents a join request with nested user and group profiles.
| Field | Type | Description |
|---|---|---|
| userInfo | object | Applicant profile represented by PublicUserInfo. |
| groupInfo | object | Group profile represented by GroupInfo. |
| handleResult | int | Request result. See GroupRequestResult. |
| reqMsg | string | Application message. |
| handleMsg | string | Handling message. |
| reqTime | int64 | Application time. |
| handleUserID | string | User that handled the application. |
| handleTime | int64 | Time when the application was handled. |
| ex | string | Application extension data. |
| joinSource | int | Join source. See JoinSource. |
| inviterUserID | string | Inviter user ID. |
Enums
GroupType
| Value | Name | Description |
|---|---|---|
| 0 | NormalGroup | Normal group. |
| 1 | SuperGroup | Super group. |
| 2 | WorkingGroup | Working group. |
GroupStatus
| Value | Name | Description |
|---|---|---|
| 0 | GroupOk | Active. |
| 1 | GroupBanChat | Group chat is banned. |
| 2 | GroupStatusDismissed | Group is dismissed. |
| 3 | GroupStatusMuted | Group is muted. |
| 4 | GroupBanPrivateChat | Private chat is prohibited. |
GroupMemberRole
Ordinary member and administrator roles can be changed through member management APIs. Group ownership cannot be assigned through the normal member profile API.
| Value | Name | Description |
|---|---|---|
| 20 | GroupOrdinaryUsers | Ordinary member. |
| 60 | GroupAdmin | Group administrator. |
| 100 | GroupOwner | Group owner. |
GroupVerification
| Value | Name | Description |
|---|---|---|
| 0 | ApplyNeedVerificationInviteDirectly | Applications require approval; invitations join directly. |
| 1 | AllNeedVerification | All methods except owner or administrator invitations require approval. |
| 2 | Directly | Join directly without approval. |
JoinSource
| Value | Name | Description |
|---|---|---|
| 1 | JoinByAdmin | Added directly by an administrator. |
| 2 | JoinByInvitation | Joined by invitation. |
| 3 | JoinBySearch | Applied after searching for the group. |
| 4 | JoinByQRCode | Joined through a QR code. |
GroupRequestResult
| Value | Name | Description |
|---|---|---|
| -1 | GroupResponseRefuse | Rejected. |
| 0 | Pending | Pending. |
| 1 | GroupResponseAgree | Accepted. |
Integration advice
Group operations often affect multiple users. Log the operationID, operator, target group, and member list in your backend.
Muting, removing members, transferring ownership, and dismissing groups are high-impact operations. Protect them with business authorization and audit workflows.
Related pages
Was this page helpful?