Skip to main content

Get user data

Gets user information by ID

Function GetUserData(Val Token, Val UserID) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
UserID--userString, NumberViber User ID

Returns: Map Of KeyAndValue - serialized JSON response from Viber


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

Result = OPI_Viber.GetUserData(Token, UserID);
    oint viber GetUserData \
--token "***" \
--user "tMNGhftyUPrB3r1lD+bT4g=="
Result
{
"status": 6,
"status_message": "notSubscribed",
"chat_hostname": "SN-CHAT-04_"
}