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 Chatroom Attributes (KV)

Query the custom attributes (KV) of a specified chatroom.

Request Method

POST: https://data center domain/chatroom/entry/query.json

Rate Limit: 100 requests per second

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

Body Parameters

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

ParameterTypeRequiredDescription
chatroomIdStringYesThe chatroom ID.
keysStringNoBatch retrieval of specific keys in the chatroom, up to 100 keys. If not provided, all keys will be retrieved.

Request Example

POST /chatroom/entry/query.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

chatroomId=kvchatroom2&keys=Lnq9MJsPY&keys=Lnq88JsPY

Response

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

Return ValueReturn TypeDescription
codeNumberReturn code, 200 indicates success.
keysArrayArray of attributes.
keys[i].keyStringThe attribute name.
keys[i].valueStringThe content of the attribute.
keys[i].userIdStringThe user ID of the last user who set this key.
keys[i].autoDeleteStringWhether to delete this key after the user leaves the chatroom, 0 for no deletion, 1 for deletion.
keys[i].lastSetTimeStringThe last time the key was set.

Response Example

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

{
"code":200,
"keys":
[{"key":"key1","value":"value1","userId":"2121","autoDelete":"0","lastSetTime":"2121"},
{"key":"key2","value":"value2","userId":"4343","autoDelete":"1","lastSetTime":"2121"}]
}