User Overview
To use RC Chat services, app users must connect to RC. From RC's perspective, a user is an app user who holds a valid Token issued by RC and accesses the instant messaging service.
Register Users
The application server (App Server) should provide RC with the user ID (userId
) of app users to obtain a unique user Token. For RC, this process of acquiring a Token with a userId
is called [user registration], which must be completed by calling the server API.
An app client must hold a valid Token to successfully connect to the RC server and use RC Chat services. When an app client user sends a login request to the server, the server queries the database to verify whether the connection request matches.
User Registration Limits
- The maximum number of registered users in the development environment? is 100.
- In the production environment?, upgrading to IM Premium or IM Enterprise removes the limit on registered users.
Delete Users
Deleting users refers to removing registered test users in the development environment via the Console to control the total number of test users. This operation is not supported in the production environment.
Deactivate Users
Deactivating users means deleting user data from RC services. Apps can use this feature to implement their own account closure functionality, meeting 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 a deactivated user ID (note that user personal data cannot be restored).
Only the IM Server API provides this capability.
User Profiles
User profiles generally refer to data such as nicknames, avatars, group nicknames, and group avatars. By default, RC does not store or maintain your app's user profile data, which must be managed on the app side. If you need to store user profile information in RC, you can enable and use RC's User Profile Hosting service to store and maintain user data.
Friend Relationships
By default, RC Chat services do 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.
If you are not using RC's friend relationship management service but need to restrict message exchanges between client users (e.g., if all userId
s of an app are leaked, allowing malicious users to bypass friend relationships and send messages to any user), consider using the allowlist service. Once a user enables and sets an allowlist, they can only receive messages from users on that list.
If you use RC's friend relationship management service, non-friends can send messages by default. To restrict messaging to friends only, you can enable the "Only friends can send one-to-one messages" feature in the RC Console (App Configuration > IM Service > User Profile Hosting > Feature Settings > Friend Settings).
User Management APIs
Feature Category | Description | Client API | Server API |
---|---|---|---|
Register Users | Use the app user's ID to obtain a Token from RC. | Not provided | Register User |
Delete Users | See Delete Users above. | Not provided | Not provided |
Invalidate Tokens | Invalidate Tokens obtained before a specific time. | Not provided | Invalidate Token |
Deactivate Users | Deactivate a user ID in RC services and delete the user's personal data. | Not provided | Deactivate User |
Query Deactivated Users | Retrieve a list of deactivated user IDs. | Not provided | Query Deactivated Users |
Reactivate User IDs | Reactivate a deactivated user ID in RC services. | Not provided | Reactivate User ID |
Set Local User Info | Set a user info provider, with data provided by the app layer. | Set User Info Provider | Not provided |
Set RC Server User Info | Set the username and avatar used in RC push services. | Not provided | No separate API is provided. User info must be provided during [user registration]. |
Get Local User Info | Retrieve user avatars, nicknames, etc., displayed in chat UIs and friend lists. | Get User Info | Not provided |
Get RC Server User Info | Retrieve user registration info from RC, including creation time and the username/avatar URL used in server push services. | Not provided | Get User Info |
Update Local User Info | Modify locally stored user nicknames, avatars, etc. | Refresh User Info | Not provided |
Update RC Server User Info | Modify the username and avatar used in RC push services. | Not provided | Modify User Info |
Ban Users | Prevent users from connecting to RC Chat services and immediately disconnect them. Can be unblocked by time or manually. Query banned user IDs and ban end times. | Not provided | Ban User, Unban User, Query Banned Users |
Check User Online Status | Query a user's online status. | Not provided | Check Online Status |
Blocklist | Add or remove users from a blocklist. Users on A's blocklist cannot send messages to A. Query blocklist info. IMKit does not provide this API. IMLib API is listed here. | Add to Blocklist, Remove from Blocklist, Check If User Is Blocked, Get Blocklist | Add to Blocklist, Remove from Blocklist, Query Blocklist |
Allowlist | Once enabled, users can only receive messages from users on their allowlist. | Not provided | Enable Allowlist, Query Allowlist Status, Add to Allowlist, Remove from Allowlist, Query Allowlist |