User overview
App users must connect to Chat to send and receive messages. A user is an app user who holds a valid token issued by the Nexconn server and connects to Chat.
Register user
The application server (App Server) sends the app user's user ID (userId) to the Nexconn server to obtain a unique user token. For the Nexconn server, obtaining a token with userId is registering a user. Your app server must call the Server API to complete this step.
The app client must hold a valid token to connect to Chat and use messaging services. When an app client user sends a login request to the server, the server queries the database to verify the connection request.
Registered user limits
- The registered user limit in the development environment? is 100.
- In the production environment?, there is no limit on registered users after upgrading to a Starter or Pro plan.
Delete user
Deleting a user means deleting registered test users through the console in the application's development environment to control the total number of test users. This operation is not supported in the production environment.
Deactivate user
Deactivating a user means deleting user data from the service. Apps can use this capability to implement their own user account cancellation function to meet App store or compliance requirements.
After the Nexconn server returns a successful deactivation result, data related to the user ID is deleted. You can query all deactivated user IDs. If needed, you can reactivate a deactivated user ID (note that user personal data cannot be recovered).
Only the Chat Server API provides these capabilities.
User information
User information refers to data such as user nicknames, avatars, group nicknames, and group avatars. By default, Chat UI SDK uses Nexconn-hosted profile data. If your app does not want to host profile data in Nexconn, use the app-managed provider mode and maintain user information on the application side.
Friend relationship
By default, Chat UI SDK uses Nexconn-hosted relationship data for friend relationship features. If your app does not use the friend relationship management service, maintain friend relationships on the application server (App Server).
Friend relationship data and direct-message permission are separate concepts. By default, non-friends can send direct messages. If your app needs to allow direct messages only between friends, enable Restrict direct messaging to friends in the console under Chat > Chat settings > Friend.
Chat UI SDK does not expose a client-side API that can safely enforce this rule by itself. Keep sensitive relationship and permission checks on the service side, and handle the SDK error result in the client when a message is rejected by the service policy.
User management interface
| Feature category | Feature description | Client API | Server API |
|---|---|---|---|
| Register user | Use the app user's user ID to obtain a token. | Not provided | Register user |
| Delete user | See Delete user above. | Not provided | Not provided |
| Expire token | Expire tokens obtained before a specific time point. | Not provided | Expire token |
| Deactivate user | Deactivating a user means disabling the user ID in the service and deleting user personal data. | Not provided | Deactivate user |
| Query deactivated users | Get the list of deactivated user IDs. | Not provided | Query deactivated users |
| Reactivate user ID | Re-enable a deactivated user ID in the service. | Not provided | Reactivate user ID |
| Set local user information | Set the user information provider, with the application layer responsible for providing data. | Set user information provider | Not provided |
| Set server user information | Set the user name and avatar used in the push service. | Not provided | No separate API provided. User information must be provided when registering a user. |
| Get local user information | Get user avatar, nickname, and other information displayed on the channel page, friend list, etc. | Get user information | Not provided |
| Get server user information | Get user information registered on the server, including user creation time and the user name and avatar URL used by the server push service. | Not provided | Get user information from the server |
| Modify local user information | Modify user nickname, avatar, and other information saved in the local client database. | Refresh user information | Not provided |
| Modify server user information | Modify the user name and avatar used in the push service. | Not provided | Modify user information |
| Block user | Prevent a user from connecting to Chat and immediately disconnect the user. The user can be unblocked after a specified duration or manually. You can also query blocked user IDs and block end times. | Not provided | Block user, Unblock user, Query blocked users |
| Query user online status | Query the online status of a user. | Not provided | Query online status |
| Blocklist management | Add or remove users from a user's blocklist. Users in A's blocklist cannot send messages to A. ChatUI handles the blocked error by default, displaying "Your message has been sent but was rejected by the recipient." The client can directly use nexconn API: NCEngine.userModule.addToBlocklist/removeFromBlocklist/checkBlocked/getBlocklist. | NCEngine.userModule.addToBlocklist, NCEngine.userModule.removeFromBlocklist, NCEngine.userModule.checkBlocked, NCEngine.userModule.getBlocklist | Add to blocklist, Remove from blocklist, Query blocklist |