# Ссылки на медиафайлы

## Получить ссылку на медиафайл

<mark style="color:green;">`POST`</mark> `https://app.jetbot24.ru/api/v1/decodeShortLink`

Этот метод позволяет получить длинную ссылку на фото/видео/аудио, отправленное пользователем в бот, чтобы в дальнейшем можно было переслать данный медиафайл.

**Body Request**

<table><thead><tr><th width="151">Name</th><th width="101">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>api_token</code><mark style="color:red;">*</mark></td><td>string</td><td>api токен вашего аккаунта</td></tr><tr><td><code>url</code><mark style="color:red;">*</mark></td><td>string</td><td>Короткая ссылка на медиафайл, хранящаяся в пользовательской переменной. Например, <a href="https://app.jetbot24.ru/w/yJ6">https://app.jetbot24.ru/w/yJ6</a></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200 Запрос успешно обработан" %}

```json
{
  "data": {
    "url": "https://storage.jetbot24.ru/bots/1/contacts/1/chat/a4ac324c-6c8a-4c59-affa-f585156d3379.jpeg?expires_at=1731314498&s=jBmmfoPPNt9IlV76ZiTt0Zw41fVPbWjqrPmBJvCblUXMuv2jJZFPqwVJQW82hAM3&sign=d2cff43c10db26a6155032d920f9c8c5230dc26760f0c47234e95397bb51c18b"
  }
}
```

{% endtab %}

{% tab title="422 Unprocessable Entity" %}

```
{
  "message": "The given data was invalid.",
  "errors": {
    "url": [
      "Поле url имеет ошибочный формат URL."
    ]
  }
}
```

{% endtab %}
{% endtabs %}


---

# 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://jetbot.gitbook.io/api/rabota-s-api/ssylki-na-mediafaily.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.
