2024-06-05 12:19:46 +02:00
---
sidebar_position: 2
---
# 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 | Destination |
|-|-|-|-|
| Token | --token | String | Token |
2024-06-06 14:33:52 +02:00
Returns: Map Of KeyAndValue - serialized JSON response from Viber
2024-06-05 12:19:46 +02:00
```bsl title="Code example"
Response = OPI_Viber.GetChannelInformation(ChannelToken); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
2024-06-05 12:35:05 +02:00
2024-06-05 12:19:46 +02:00
```
```sh title="CLI command example"
oint viber GetChannelInformation --token %token%
```
```json title="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
}
```