Get user data
Gets user information by ID
- Parameters
- Advanced call ?
Function GetUserData(Val Token, Val UserID) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| UserID | --user | String, Number | ✔ | Viber User ID |
Returns
Map Of KeyAndValue - serialized JSON response from Viber
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Token = "523b58ba82afffaa-7ef3b426...";
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Result = OPI_Viber.GetUserData(Token, UserID);
- Bash
- CMD/Bat
oint viber GetUserData \
--token "***" \
--user "tMNGhftyUPrB3r1lD+bT4g=="
oint viber GetUserData ^
--token "***" ^
--user "tMNGhftyUPrB3r1lD+bT4g=="
Result
{
"status": 6,
"status_message": "notSubscribed",
"chat_hostname": "SN-CHAT-04_"
}