User groups
User groups help you manage members in community channels. Combined with private subchannels, they let you control access, messaging, and notification delivery more precisely.
Prerequisites
User groups mainly work by binding to private subchannels. This lets you manage user permissions for sending messages, receiving messages, and receiving notifications in those subchannels. Before you use user groups, review Private subchannel overview.
How user groups work
Your app server can create up to 50 user groups per community channel via the Server API. Each user group can contain up to 100 community members, and a single user can belong to multiple user groups.
After you create a user group, bind it to one or more subchannels:
- Binding to a private subchannel: All group members can send and receive messages and notifications in that subchannel, similar to users on the subchannel member list.
- Binding to a public subchannel: This does not immediately affect messaging permissions. If the public subchannel is later switched to private, all group members automatically gain access.
- A single subchannel can be bound to up to 10 user groups. A single user group can be bound to multiple subchannels (up to 50 subchannels per community).
App clients can't manage user groups directly. The client SDK only provides delegate callbacks for monitoring user group changes:
- User group deleted: All members in the group receive a callback.
- Member changes: Users who are added to or removed from the group receive a callback.
- Binding changes: All members in the group receive a callback when a subchannel binding is added or removed.
Combining user groups with private subchannel member lists
A user can access a private subchannel if they are in any bound user group or on the subchannel's member list.
When using both user groups and member lists, a user might appear in the member list and in multiple bound user groups simultaneously. To fully revoke a user's access to a private subchannel:
- Remove the user from the subchannel's member list.
- Check all user groups bound to the subchannel and remove the user from each group, or unbind the groups.
Management APIs
Implement user group business logic on your app server, such as join requests and approval flows. We also recommend that your app server maintain the relationships between users, user groups, and subchannels.
Client developers only need to interact with their app server for user group management. The app server then calls the corresponding Nexconn Server APIs.
| Feature | Server API |
|---|---|
| Create / delete user groups | Create a user group, Delete a user group |
| List user groups | List user groups |
| Add / remove members | Add members, Remove members |
| Query user's groups | Query user's groups |
| Bind subchannel to user group | Bind subchannel to user group |
| Unbind subchannel from user group | Unbind subchannel from user group |
| Query groups bound to subchannel | Query groups bound to subchannel |
| Query subchannels bound to group | Query subchannels bound to group |