Queries whether one or more users are online based on their UIDs
Operation description
Usage notes
This operation supports batch queries. You can query the online status of up to 20 users at a time.
QPS limits
The single-user queries per second (QPS) limit for this operation is 100 times/second. If you exceed this limit, API calls will be throttled, which may affect your business. You should make API calls at a reasonable rate. For more information, see QPS limits.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:BatchGetOnlineUsers |
get |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The ID of the interactive messaging application. |
a494caec-***-695ef345db77 |
| GroupId |
string |
Yes |
The message group ID. |
23wcaec-***695ef |
| UserIds |
string |
Yes |
The list of user IDs. Separate multiple user IDs with commas (,). You can specify up to 20 user IDs. |
de1**a0,hu**9 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned parameters. |
||
| RequestId |
string |
The request ID. |
16A96B9A-****-CB92E68F4CD8 |
| Result |
object |
The returned result |
|
| OnlineUsers |
array<object> |
The array of objects |
|
|
object |
|||
| JoinTime |
integer |
The UTC timestamp when the user joined the message group. Unit: milliseconds |
12**45 |
| Online |
boolean |
Indicates whether the user is online. Valid values:
|
true |
| UserId |
string |
The user ID. |
de1**a0 |
Examples
Success response
JSON format
{
"RequestId": "16A96B9A-****-CB92E68F4CD8",
"Result": {
"OnlineUsers": [
{
"JoinTime": 0,
"Online": true,
"UserId": "de1**a0"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden | User not authorized to operate on the specified resource. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.