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 | ✔ | Bot token | 
| ChatID | --chat | String, Number | ✔ | Target chat ID or ChatID*TopicID | 
| Text | --text | String | ✔ | Message text | 
| Video | --video | BinaryData, String | ✔ | Video file | 
| Keyboard | --keyboard | String, Structure Of KeyAndValue | ✖ | Keyboard. See FormKeyboardFromButtonArray | 
| Markup | --parsemode | String | ✖ | Text processing type (HTML, Markdown, MarkdownV2) | 
Returns: Map Of KeyAndValue - serialized JSON response from Telegram
tip
Method at API documentation: sendVideo
Parameters with Binary data type can also accept file paths on disk and URLs
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);
- Bash
- CMD/Bat
    oint telegram SendVideo \
     --token "***" \
     --chat "@testsichee" \
     --text "Строковое значение" \
     --video "/tmp/wix0haw1.uet"
    oint telegram SendVideo ^
     --token "***" ^
     --chat "@testsichee" ^
     --text "Строковое значение" ^
     --video "/tmp/wix0haw1.uet"
Result
{
 "ok": true,
 "result": {
  "message_id": 17190,
  "from": {
   "id": 6129457865,
   "is_bot": true,
   "first_name": "Бот Виталий",
   "username": "sicheebot"
  },
  "chat": {
   "id": 461699897,
   "first_name": "Anton",
   "last_name": "Titovets",
   "username": "bayselonarrend",
   "type": "private"
  },
  "date": 1760516300,
  "video": {
   "duration": 5,
   "width": 640,
   "height": 480,
   "file_name": "video",
   "mime_type": "video/mp4",
   "thumbnail": {
    "file_id": "AAMCAgADGQMAAkMmaO9Yy7iE6beqfr5lp6ikFwwRGJkAAh6GAAI3b3lLw9Y7Q783A68BAAdtAAM2BA",
    "file_unique_id": "AQADHoYAAjdveUty",
    "file_size": 20106,
    "width": 320,
    "height": 240
   },
   "thumb": {
    "file_id": "AAMCAgADGQMAAkMmaO9Yy7iE6beqfr5lp6ikFwwRGJkAAh6GAAI3b3lLw9Y7Q783A68BAAdtAAM2BA",
    "file_unique_id": "AQADHoYAAjdveUty",
    "file_size": 20106,
    "width": 320,
    "height": 240
   },
   "file_id": "BAACAgIAAxkDAAJDJmjvWMu4hOm3qn6-ZaeopBcMERiZAAIehgACN295S8PWO0O_NwOvNgQ",
   "file_unique_id": "AgADHoYAAjdveUs",
   "file_size": 1137878
  },
  "caption": "Строковое значение"
 }
}