Mengkueri apakah satu atau beberapa pengguna sedang online berdasarkan UID mereka.
Deskripsi operasi
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.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:BatchGetOnlineUsers |
get |
*Domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
ID aplikasi pengiriman Paket interaktif. |
a494caec-***-695ef345db77 |
| GroupId |
string |
Yes |
ID kelompok Paket. |
23wcaec-***695ef |
| UserIds |
string |
Yes |
Daftar ID pengguna. Pisahkan bebelaju ID pengguna dengan tanda koma (,). Anda dapat menentukan hingga 20 ID pengguna. |
de1**a0,hu**9 |
Elemen respons
|
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 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "16A96B9A-****-CB92E68F4CD8",
"Result": {
"OnlineUsers": [
{
"JoinTime": 0,
"Online": true,
"UserId": "de1**a0"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden | User not authorized to operate on the specified resource. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.