Get channel information
Here you can get the channel's user IDs. Bot IDs need to be obtained from the Webhook arrivals The user ID from channel information is not suitable for sending messages through the bot - they are different
- Parameters
- Advanced call ?
Function GetChannelInformation(Val Token) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
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 structure with fields code, body, and headers |
1C:Enterprise/OneScript code example
Token = "523b58ba82afffaa-7ef3b426...";
Result = OPI_Viber.GetChannelInformation(Token);
- Bash
- CMD/Bat
oint viber GetChannelInformation \
--token "***"
oint viber GetChannelInformation ^
--token "***"
Result
{
"status": 0,
"status_message": "ok",
"id": "pa:5925427292815753130",
"chat_hostname": "SN-CHAT-08_",
"name": "1C Test",
"members": [
{
"id": "tMNGhftyUPrB3r1lD+bT4g==",
"name": "John",
"role": "superadmin"
}
]
}