mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-16 11:38:11 +02:00
56 lines
962 B
Markdown
56 lines
962 B
Markdown
---
|
|
sidebar_position: 4
|
|
---
|
|
|
|
# Get online users
|
|
Gets the status of a user or multiple users by ID
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
`Function GetOnlineUsers(Val Token, Val UserIDs) Export`
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|-|-|-|-|
|
|
| Token | --token | String | Viber Token |
|
|
| UserIDs | --users | String,Number,Array of String,Number | Viber User(s) ID |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Viber
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
```bsl title="Code example"
|
|
|
|
Response = OPI_Viber.GetOnlineUsers(Token, UserID); //Map
|
|
Response = OPI_Tools.JSONString(Response); //JSON string
|
|
|
|
```
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
oint viber GetOnlineUsers --token %token% --users %users%
|
|
|
|
```
|
|
|
|
```json title="Result"
|
|
{
|
|
"users": [
|
|
{
|
|
"last_online": 1704796869778,
|
|
"online_status_message": "offline",
|
|
"online_status": 1,
|
|
"id": "d3jxe111111111YGgZg=="
|
|
}
|
|
],
|
|
"status_message": "ok",
|
|
"status": 0
|
|
}
|
|
```
|