1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-24 05:36:29 +02:00
Vitaly the Alpaca (bot) 293c73c1f0 Main build (Jenkins)
2024-10-15 15:15:47 +03:00

51 lines
995 B
Plaintext

---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# 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 | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
Returns: Map Of KeyAndValue - serialized JSON response from Viber
<br/>
```bsl title="Code example"
Token = "523b58ba82afffaa-7ef3b426...";
Result = OPI_Viber.GetChannelInformation(Token);
```
```json title="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"
}
]
}
```