提交工单
咨询集成、功能及报价等问题
Query the user's online status, and support querying a single user or multiple users' online status in batches.
Rate limit: 20 requests/second
Listed below are the parameters specific to this request and part of the public request parameters. For the complete list of public request parameters, see Accessing Server APIs - Public parameters.
Parameter | Type | Required | Description |
---|---|---|---|
UserId[] |
Array of String |
Yes |
The list of user IDs to be queried, up tp 100 user IDs can be queried. For example: UserId[]=a&UserId[]=b |
The UserId
can only contain numbers, letters, and the following special characters: !#$%&()+-:;<=.>?@[]^_{}|~.
https://zim-api.zego.im/?Action=QueryUserOnlineState
&UserId[]=a&UserId[]=b
&<Public parameters>
Parameter | Type | Description |
---|---|---|
Code |
Number |
Return code. |
Message |
String |
Description of the request execution result. |
RequestId |
String |
Request ID. |
Result |
Object |
The result fo the quert to the user's online status. |
ErrorList |
Object |
The list of query failures. |
Among which, the returned field ErrorList:
Parameter | Type | Description |
---|---|---|
SubCode |
Number |
The returned code when the query fails. This parameter is only returned when |
{
"Code":0,
"Message":"success",
"RequestId":"343649807833778782"
"Result": [
{
"UserId": "id1",
"Status": "Offline"
},
{
"UserId": "id2",
"Status": "Online"
}
],
"ErrorList": [
{
"UserId": "id4",
"SubCode": 1
}
]
}
Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.
return code | Description |
---|---|
660000011 |
The number of users has exceeded the limit. |