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
Function GetChannelInformation(Val Token) Export
Parameter | CLI option | Type | Description |
---|---|---|---|
Token | --token | String | Token |
Returns: Map Of KeyAndValue - serialized JSON response from Viber
Code example
Response = OPI_Viber.GetChannelInformation(ChannelToken); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
CLI command example
oint viber GetChannelInformation --token %token%
Result
{
"members": [
{
"role": "admin",
"name": "John",
"id": "d3jxe611111111kjYGgZg=="
}
],
"subcategory": "Advertising Service",
"category": "Local Businesses",
"location": {
"lon": -73.96878,
"lat": 40.7691018
},
"icon": "https://media-direct.cdn.viber.com/pg_download?pgtp=icons&dlid=0-04-01-05bfe24da13dddf32cf52976b099dc6965c03300763e6a9316de26986e5dea05&fltp=jpg&imsz=0000",
"subscribers_count": 0,
"name": "1CTestBot",
"chat_hostname": "SN-CHAT-01_",
"id": "pa:5925429953186752236",
"country": "US",
"uri": "1ctestbot",
"status_message": "ok",
"status": 0
}