You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-12-05 22:53:35 +02:00
69 lines
1.6 KiB
Plaintext
Vendored
69 lines
1.6 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 2
|
|
description: Get channel information and other functions to work with Viber in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Viber]
|
|
---
|
|
|
|
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="1C:Enterprise/OneScript code example"
|
|
Token = "523b58ba82afffaa-7ef3b426...";
|
|
Result = OPI_Viber.GetChannelInformation(Token);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint viber GetChannelInformation \
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint viber GetChannelInformation ^
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```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"
|
|
}
|
|
]
|
|
}
|
|
```
|