User Overview
App users must integrate with RC services to use the IM service. For RC, a user refers to an App user who holds a valid Token issued by RC and accesses the IM service.
User Registration
The application server (App Server) should provide the App user's user ID (userId) to the RC server to obtain a unique user Token. For RC, this process of obtaining a Token with userId is called user registration, which must be completed by calling the Server API.
The App client must hold a valid Token to successfully connect to the RC server and use the RC IM service. When an App client user sends a login request to the server, the server queries the database to verify if the connection request matches.
User Registration Limit
- The maximum number of registered users in the development environment? is 100.
- In the production environment?, there is no registration limit.
Delete User
Deleting a user refers to removing registered test users in the development environment through the Console to control the total number of test users. This operation is not supported in the production environment.
Deactivate Users
Deactivating a user refers to deleting user data in RC services. Apps can use this capability to implement their own account closure functionality to meet App store or compliance requirements.
After RC returns a successful deactivation result, all data associated with the user ID is deleted. You can query RC for all deactivated user IDs. If needed, you can reactivate previously deactivated user IDs (note that user personal data cannot be restored).
Only the IM Server API provides these capabilities.
User Information
User information generally refers to data such as nicknames, avatars, group nicknames, and group avatars. By default, RC does not store or maintain your App's user information data, which needs to be managed on the App side. If you need to store your App's user profile information in RC, you can enable and use RC's User Profile Hosting service to store and maintain user profile information in RC.
Friend Relationship
By default, the RC IM service does not synchronize or save friend relationship data from the App side, which must be maintained by the application server (App Server). If you need to use RC's friend relationship management service, you can enable RC's User Profile Hosting service. Once enabled, you can manage user friend relationships using RC's friend relationship management service.
Without using RC's friend relationship management service, if you need to restrict message sending and receiving behavior between client users (e.g., if all userIds of an App are leaked, allowing a malicious user to bypass friend relationships and send messages to any user), you can 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 you use RC's friend relationship management service, non-friends can send messages by default. If you need to restrict messaging to friends only, you can enable this feature in the RC Console under Chat > Chat settings > Friends > Only friends can send one-to-one chat messages.
User Management APIs
| Feature Category | Description | Client API | Server API |
|---|---|---|---|
| User Registration | Obtain a Token from RC using the App user's user ID. | Not provided | User Registration |
| Delete User | See Delete User above. | Not provided | Not provided |
| Expire Token | Invalidate Tokens obtained before a specific time. | Not provided | Expire Token |
| Deactivate User | Deactivate a user ID in RC services and delete user personal data. | Not provided | Deactivate User |
| Query Deactivated Users | Retrieve a list of deactivated user IDs. | Not provided | Query Deactivated Users |
| Reactivate User ID | Re-enable a deactivated user ID in RC services. | Not provided | Reactivate User ID |
| Set User Info on RC Server | Set the user name and avatar used in RC push services. | Not provided | No separate API is provided. User info must be provided during User Registration. |
| Get User Info from RC Server | Retrieve user registration info from RC, including creation time and the user name/avatar URL used by the server's push service. | Not provided | Get User Info |
| Modify User Info on RC Server | Modify the user name and avatar used in RC push services. | Not provided | Modify User Info |
| Ban User | Prevent a user from connecting to RC IM services and immediately disconnect them. Can be unblocked by time or manually. Query banned user IDs and ban end times. | Not provided | Add Banned User, Unblock User, Query Banned Users |
| Check User Online Status | Check a user's online status. | Not provided | Check Online Status |
| Add to Blocklist | Add a user to another user's blocklist. Users in A's blocklist cannot send messages to A. | Add to Blocklist | Add to Blocklist |
| Remove from Blocklist | Remove a user from another user's blocklist. | Remove from Blocklist | Remove from Blocklist |
| Check Blocklist Status | Check if a user (userId) is in the current user's blocklist. | Check If User Is in Blocklist | Not provided |
| Get Blocklist | Retrieve a user's blocklist. | Get Blocklist | Query Blocklist |
| User Whitelist | Once enabled and set, a user can only receive messages from users in their whitelist. | Not provided | Enable Whitelist, Query Whitelist Status, Add to Whitelist, Remove from Whitelist, Query Whitelist |