# Отправка фото

Как отправить фото.

<figure><img src="/files/08AMF2jWZH0U0rpWjA8c" alt=""><figcaption></figcaption></figure>

**Создайте блок** \*\*HTTP-запрос с запросом <https://api.telegram.org/botТОКЕНБОТА/sendPhoto**\\>
\
**Настройки для блока:**

Метод POST

1. Токен бота из @BotFather
2. chat\_id = {{ telegram\_id }}
3. photo = ссылка на фото из хостинга, телеграмм канала, либо переменная.
4. Проверенный и работающий вариант - загрузить видео в свой тг-канал и скопировать ссылку на сообщение.&#x20;

### Получение ссылки на фото, отправленное пользователем.&#x20;

Записываем ответ пользователя в переменную, к примеру **url\_photo**.

<figure><img src="/files/ObuLC2dfB5xhm43IIqoj" alt=""><figcaption></figcaption></figure>

<https://watbot.ru/api/v1/decodeShortLink>?

api\_token={{ token\_WB}}

\&url={{ $url\_photo}}

Заголовок: X-Requested-With:XMLHttpRequest

{{ token\_WB}} - токен из личного кабинета [Watbot](https://watbot.ru/account/api).&#x20;

<figure><img src="/files/zdHpuAnLicBqDWlAFp2R" alt=""><figcaption></figcaption></figure>

Записываем ответ json в переменные.

data.url = url\_photo


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.watbot.ru/chat-boty/bloki/nastroiki-http-blokov-iz-video/otpravka-foto.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
