Skip to main content

Get online users

Gets the status of a user or multiple users by ID

Function GetOnlineUsers(Val Token, Val UserIDs) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringViber Token
UserIDs--usersString,Number,Array of String,NumberViber User(s) ID

Returns: Map Of KeyAndValue - serialized JSON response from Viber


1C:Enterprise/OneScript code example
    Token  = "523b58ba82afffaa-7ef3b426...";
UserID = "tMNGhftyUPrB3r1lD+bT4g==";

Result = OPI_Viber.GetOnlineUsers(Token, UserID);
    oint viber GetOnlineUsers \
--token "***" \
--users "tMNGhftyUPrB3r1lD+bT4g=="
Result
{
"status": 0,
"status_message": "ok",
"users": [
{
"id": "tMNGhftyUPrB3r1lD+bT4g==",
"online_status": 4,
"online_status_message": "unavailable",
"last_online": 0
}
]
}