---
sidebar_position: 6
description: Send GIF 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 GIF
 Sends a GIF to a chat or channel



`Function SendGif(Val Token, Val ChatID, Val Text, Val GIF, 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 |
  | GIF | --gif | BinaryData, String | &#x2714; | GIF 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: [sendAnimation](https://core.telegram.org/bots/api#sendanimation)

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      = "Строковое значение";
    GIF       = "https://hut.openintegrations.dev/test_data/animation.gif";

    GifPath = GetTempFileName("gif");
    CopyFile(GIF, GifPath);

    GifDD = New BinaryData(GifPath);

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

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

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

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


```json title="Result"
{
 "ok": true,
 "result": {
  "message_id": 18410,
  "from": {
   "id": 6129457865,
   "is_bot": true,
   "first_name": "Бот Виталий",
   "username": "sicheebot"
  },
  "chat": {
   "id": 461699897,
   "first_name": "Anton",
   "last_name": "Titovets",
   "username": "bayselonarrend",
   "type": "private"
  },
  "date": 1765390468,
  "animation": {
   "file_name": "animation.gif.mp4",
   "mime_type": "video/mp4",
   "duration": 3,
   "width": "***",
   "height": 220,
   "thumbnail": {
    "file_id": "AAMCAgADGQMAAkfqaTm4hN8qqe3JonjUqmhpTfglNSEAAlCQAAKK7MhJhGpFMTL4kBIBAAdtAAM2BA",
    "file_unique_id": "AQADUJAAAorsyEly",
    "file_size": 11352,
    "width": "***",
    "height": 220
   },
   "thumb": {
    "file_id": "AAMCAgADGQMAAkfqaTm4hN8qqe3JonjUqmhpTfglNSEAAlCQAAKK7MhJhGpFMTL4kBIBAAdtAAM2BA",
    "file_unique_id": "AQADUJAAAorsyEly",
    "file_size": 11352,
    "width": "***",
    "height": 220
   },
   "file_id": "CgACAgIAAxkDAAJH6mk5uITfKqntyaJ41KpoaU34JTUhAAJQkAACiuzISYRqRTEy-JASNgQ",
   "file_unique_id": "AgADUJAAAorsyEk",
   "file_size": 84965
  },
  "document": {
   "file_name": "animation.gif.mp4",
   "mime_type": "video/mp4",
   "thumbnail": {
    "file_id": "AAMCAgADGQMAAkfqaTm4hN8qqe3JonjUqmhpTfglNSEAAlCQAAKK7MhJhGpFMTL4kBIBAAdtAAM2BA",
    "file_unique_id": "AQADUJAAAorsyEly",
    "file_size": 11352,
    "width": "***",
    "height": 220
   },
   "thumb": {
    "file_id": "AAMCAgADGQMAAkfqaTm4hN8qqe3JonjUqmhpTfglNSEAAlCQAAKK7MhJhGpFMTL4kBIBAAdtAAM2BA",
    "file_unique_id": "AQADUJAAAorsyEly",
    "file_size": 11352,
    "width": "***",
    "height": 220
   },
   "file_id": "CgACAgIAAxkDAAJH6mk5uITfKqntyaJ41KpoaU34JTUhAAJQkAACiuzISYRqRTEy-JASNgQ",
   "file_unique_id": "AgADUJAAAorsyEk",
   "file_size": 84965
  },
  "caption": "Строковое значение"
 }
}
```
