Skip to main content

User overview

App users must connect to the service to use instant messaging. A user is an App user who holds a valid token issued by the platform and connects to use instant messaging services.

Register user

The application server (App Server) provides the App user's user ID (userId) to the server to obtain a unique user token. For the platform, this step of obtaining a token with userId is registering a user, and must be completed by calling the Server API.

The application client must hold a valid token to successfully connect to the server and use instant messaging services. When an App client user sends a login request to the server, the server queries the database to check whether the connection request matches.

Registered user limit

  • The registered user limit in the development environment? is 100.
  • In the production environment?, there is no limit on registered users after upgrading to IM Flagship Edition or IM Premium Edition.

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 platform 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 IM 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).

If you are not using the friend relationship management service and need to restrict message sending behavior between client users (for example, if all userId values are leaked, allowing a malicious user to send messages to any user bypassing friend relationships), consider using the user whitelist service. Once a user enables and sets a whitelist, they can only receive messages from users in that whitelist.

If using the friend relationship management service, non-friends can also send messages normally by default. If you need to restrict message sending to friends only, you can enable this feature in the console under IM Service > Feature Configuration > Friends > Only friends can send direct messages to each other.

User management interface

Feature categoryFeature descriptionClient APIServer API
Register userUse the App user's user ID to obtain a token.Not providedRegister user
Delete userSee Delete user above.Not providedNot provided
Expire tokenExpire tokens obtained before a specific time point.Not providedExpire token
Deactivate userDeactivating a user means disabling the user ID in the service and deleting user personal data.Not providedDeactivate user
Query deactivated usersGet the list of deactivated user IDs.Not providedQuery deactivated users
Reactivate user IDRe-enable a deactivated user ID in the service.Not providedReactivate user ID
Set local user informationSet the user information provider, with the application layer responsible for providing data.Set user information providerNot provided
Set server user informationSet the user name and avatar used in the push service.Not providedNo separate API provided. User information must be provided when registering a user.
Get local user informationGet user avatar, nickname, and other information displayed on the channel page, friend list, etc.Get user informationNot provided
Get server user informationGet user information registered on the server, including user creation time and the user name and avatar URL used by the server push service.Not providedGet user information from the server
Modify local user informationModify user nickname, avatar, and other information saved in the local client database.Refresh user informationNot provided
Modify server user informationModify the user name and avatar used in the push service.Not providedModify user information
Block userPrevent a user from connecting to the instant messaging service and immediately disconnect. Can be unblocked by duration or manually. Query blocked user IDs and block end time.Not providedBlock user, Unblock user, Query blocked users
Query user online statusQuery the online status of a user.Not providedQuery online status
Blocklist managementAdd 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.getBlocklistAdd to blocklist, Remove from blocklist, Query blocklist
User whitelistOnce a user enables and sets a whitelist, they can only receive messages from users in that whitelist.Not providedEnable user whitelist, query user whitelist status, add to whitelist, remove from whitelist, query whitelist