Skip to main content

Starting March 27, 2026, RC is rebranded as Nexconn. Existing RC SDK customers can continue using this documentation. New customers should refer to the Nexconn developer documentation.

Query User Online Status

Actively query the online status of a specific user.

Through the Server API interface, you can actively query the online status of a specific user. The API call is rate-limited and should not be invoked frequently. This can be used to display user status on a management platform or to check if the client of a specified user has successfully connected to the IM service.

tip

If you need the IM service to send real-time notifications about user status changes, you can enable the Subscription User Status service. For more details, see Subscription User Status.

Request Method

POST https://data center domain/user/checkOnline.json

Rate Limit: 100 requests per second

Signature Rule: All server API requests require signature verification. For more details, see API Request Signature.

Body Parameters

The HTTP request body data format is application/x-www-form-urlencoded, and it supports the following HTTP form parameters:

ParameterTypeRequiredDescription
userIdStringYesUser ID.

Request Example

POST /user/checkOnline.json HTTP/1.1
Host: api.rong-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/x-www-form-urlencoded

userId=jlk456j5

Response

The HTTP response body contains a JSON object with the following structure:

Return ValueTypeDescription
codeNumberReturn code, 200 indicates success.
statusStringUser status. 1 - User is currently online. 0 - User is currently offline.

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":200,"status":"1"}