1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-25 02:42:28 +02:00
OpenIntegrations/docs/en/md/Viber/Settings-and-information/Get-channel-information.md

64 lines
1.4 KiB
Markdown
Raw Normal View History

---
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
2024-07-10 12:58:29 +02:00
`Function GetChannelInformation(Val Token) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
Returns: Map Of KeyAndValue - serialized JSON response from Viber
2024-07-10 13:05:58 +02:00
<br/>
2024-07-10 12:58:29 +02:00
```bsl title="Code example"
Response = OPI_Viber.GetChannelInformation(ChannelToken); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
```
```sh title="CLI command example"
oint viber GetChannelInformation --token %token%
```
```json title="Result"
2024-07-10 13:11:17 +02:00
{
"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
}
```