User Group Overview
The Ultra Group User Group feature is a member management tool provided by RC's ultra group service. When combined with Ultra Group Private Channels, it enables apps to achieve more efficient ultra group member management, communication control, and granular notification capabilities.
Prerequisites
The IMLib SDK has supported Ultra Group User Group functionality since version 5.4.0.
The Ultra Group User Group feature primarily provides batch management capabilities for users' communication permissions (message sending/receiving and notifications) in community private channels through the binding operation between user groups and private channels, enhancing app integration efficiency and ultra group operational management.
Before understanding and using the Ultra Group User Group feature, you should first familiarize yourself with the Ultra Group Private Channel functionality. See Ultra Group Private Channel Overview.
How to Use Ultra Group User Groups
App Servers can create up to 50 user groups (userGroup) in an ultra group by calling RC's server APIs, with each user group containing a maximum of 100 ultra group members. A single user can belong to multiple user groups.
After creation, user groups can be bound to ultra group channels. If a user group is bound to one or more private channels, all members of that user group gain the ability to send/receive messages and receive notifications in the bound private channels.
- When an app binds a user group to a private channel, all group members are effectively considered as having joined that private channel. Similar to users in the channel's member list, only joined members can view the channel, receive/send messages, and get notifications within it.
- Binding a user group to a public channel doesn't affect members' message permissions. However, if that public channel is later converted to a private channel, the group members will automatically gain message and notification privileges in the now-private channel.
- An app can bind up to 10 user groups to a single channel, and a user group can be bound to multiple channels (maximum 50 channels per ultra group).
The ultra group service provides a default RCDefault channel that's open to all ultra group members and cannot be made private. Avoid binding user groups to the RCDefault channel.
App Clients cannot perform user group management operations. They can only listen for user group-related change notifications through SDK callback methods, including:
- User Group Deletion: All group members receive client callbacks
- Member Changes: Users added to or removed from groups receive callbacks
- Channel-Binding Changes: All group members receive callbacks
Combining User Groups with Private Channel Member Lists
Users can send/receive messages and get notifications in a private channel if they either:
- Belong to any user group bound to that channel, OR
- Are listed in the channel's member list.
When using both private channel member lists and user groups together, your app might encounter these scenarios:
- A private channel has its own member list with multiple users added
- The same private channel is bound to multiple user groups
In such cases, a user might appear both in the channel's member list and multiple bound user groups. To completely revoke a user's access to the private channel, you must:
- Remove the user from the channel's member list
- Either:
- Remove the user from all bound user groups, OR
- Unbind the relevant user groups
User Group Management APIs
RC's IM server provides core management APIs for ultra group user groups. Apps must implement their own business logic (e.g., join requests, approval workflows) and are recommended to maintain their own mapping of user-group-channel relationships.
For client developers, basic management operations like group creation only require interaction with your app server, which should call the corresponding RC Server APIs.
The table below outlines key ultra group user group management interfaces. See the API List in IM Server documentation for complete reference.
| Category | Description | RC Server API |
|---|---|---|
| Create/Delete Groups | Create user groups in specified ultra groups. Deletion removes all user-group-channel relationships. | Create User Group, Delete User Group |
| List Groups | Paginated query of user groups in an ultra group, returning group IDs. | Query User Group List |
| Add/Remove Users | Manage group membership. | Add User, Remove User |
| Query User's Groups | Paginated query of groups a user belongs to within an ultra group. | Query User's Groups |
| Bind Groups to Channels | Link channels with user groups (max 10 groups per channel). | Bind Channel to User Group |
| Unbind Groups | Remove channel-group bindings (max 10 per request). | Unbind Channel from User Group |
| Query Channel's Groups | Paginated query of groups bound to a channel. | Query Channel's User Groups |
| Query Group's Channels | Paginated query of channels bound to a group. | Query Group's Bound Channels |