BatchGetOnlineUsers
Queries whether one or more users are online based on their user IDs.
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 QPS limit for a single user calling this operation is 100 queries per second. If the limit is exceeded, API calls are throttled, which may affect your business. 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 ID of the message group. |
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 response parameters. |
||
| RequestId |
string |
The ID of the request. |
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 ID of the user. |
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. | You do not have sufficient permissions for this operation. Contact your administrator to configure access permissions. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.