User groups
User groups help you manage members in community channels. Combined with private subchannels, they let you manage permissions and notification behavior more efficiently.
Prerequisites
User groups are designed to work with private subchannels. Before you use user groups, review Private subchannel overview.
How user groups work
Your app server creates user groups through the Server API. Each community can have up to 50 user groups, with up to 100 members per group. A single user can belong to multiple groups.
When a user group is bound to a subchannel:
- Private subchannel binding: All group members can send and receive messages and notifications in that subchannel.
- Public subchannel binding: This doesn't immediately affect messaging scope. If the subchannel is later changed to private, the group members automatically gain access.
Binding limits
- Each subchannel can be bound to up to 10 user groups.
- Each user group can be bound to multiple subchannels (up to 50 subchannels per community).
The default NCDefault subchannel is always public and cannot be made private. Avoid binding user groups to it.
Mixed usage: User groups + member lists
A user gains access to a private subchannel if they are in any of the following:
- The subchannel's member list
- Any user group bound to the subchannel
To fully revoke a user's access, remove them from:
- The subchannel's member list
- All user groups bound to that subchannel
Client-side capabilities
The client SDK does not provide user group management APIs. You can only monitor user group changes through event listeners:
| Event | Recipients |
|---|---|
| User group deleted | All members in the group |
| Member added or removed | The affected user |
| Subchannel binding changed | All members in the group |
See Monitor user group status changes for implementation details.
User group management (server API)
| Action | Server API |
|---|---|
| Create/delete user group | Create, Delete |
| List user groups | List |
| Add/remove members | Add, Remove |
| Query user's groups | Query |
| Bind/unbind subchannel | Bind, Unbind |
| Query bound subchannels | Query |
| Query bound user groups | Query |