---
sidebar_position: 3
description: Send video and other functions to work with Telegram 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, Telegram]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Send video
 Sends a video to a chat or channel



`Function SendVideo(Val Token, Val ChatID, Val Text, Val Video, Val Keyboard = "", Val Markup = "Markdown") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Bot token |
  | ChatID | --chat | String, Number | &#x2714; | Target chat ID or ChatID*TopicID |
  | Text | --text | String | &#x2714; | Message text |
  | Video | --video | BinaryData, String | &#x2714; | Video file |
  | Keyboard | --keyboard | String, Structure Of KeyAndValue | &#x2716; | Keyboard. See FormKeyboardFromButtonArray |
  | Markup | --parsemode | String | &#x2716; | Text processing type (HTML, Markdown, MarkdownV2) |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Telegram

:::tip
Method at API documentation: [sendVideo](https://core.telegram.org/bots/api#sendvideo)

Parameters with Binary data type can also accept file paths on disk and URLs
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Token     = "6129457865:AAFyzNYOAFbu...";
    ChatID    = "461699897";
    ChannelID = "@testsichee";
    Text      = "Строковое значение";
    Video     = "https://hut.openintegrations.dev/test_data/video.mp4";

    VideoPath = GetTempFileName("mp4");
    CopyFile(Video, VideoPath);

    VideoDD = New BinaryData(VideoPath);

    // In chat, by URL
    Result = OPI_Telegram.SendVideo(Token, ChatID, Text, Video);

    // To channel, on disk
    Result = OPI_Telegram.SendVideo(Token, ChannelID, Text, VideoPath);

    // To channel, from binary data
    Result = OPI_Telegram.SendVideo(Token, ChannelID, Text, VideoDD);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint telegram SendVideo \
             --token "***" \
             --chat "***" \
             --text "Строковое значение" \
             --video "/tmp/b4ywq0gt.ufk"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint telegram SendVideo ^
             --token "***" ^
             --chat "***" ^
             --text "Строковое значение" ^
             --video "/tmp/b4ywq0gt.ufk"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "ok": true,
 "result": {
  "message_id": 18406,
  "from": {
   "id": 6129457865,
   "is_bot": true,
   "first_name": "Бот Виталий",
   "username": "sicheebot"
  },
  "chat": {
   "id": 461699897,
   "first_name": "Anton",
   "last_name": "Titovets",
   "username": "bayselonarrend",
   "type": "private"
  },
  "date": 1765390370,
  "video": {
   "duration": 5,
   "width": "***",
   "height": 480,
   "file_name": "video",
   "mime_type": "video/mp4",
   "thumbnail": {
    "file_id": "AAMCAgADGQMAAkfmaTm4IvTD4tROkGojiYweDwrSEbwAAkSQAAKK7MhJC6OVu0cQkM4BAAdtAAM2BA",
    "file_unique_id": "AQADRJAAAorsyEly",
    "file_size": 19828,
    "width": "***",
    "height": 240
   },
   "thumb": {
    "file_id": "AAMCAgADGQMAAkfmaTm4IvTD4tROkGojiYweDwrSEbwAAkSQAAKK7MhJC6OVu0cQkM4BAAdtAAM2BA",
    "file_unique_id": "AQADRJAAAorsyEly",
    "file_size": 19828,
    "width": "***",
    "height": 240
   },
   "file_id": "BAACAgIAAxkDAAJH5mk5uCL0w-LUTpBqI4mMHg8K0hG8AAJEkAACiuzISQujlbtHEJDONgQ",
   "file_unique_id": "AgADRJAAAorsyEk",
   "file_size": 1137878
  },
  "caption": "Строковое значение"
 }
}
```
