# HTTP Request node returns 401 Unauthorized when trying to send animation or document/video via Telegram Bot API

**URL:** <https://community.n8n.io/t/http-request-node-returns-401-unauthorized-when-trying-to-send-animation-or-document-video-via-telegram-bot-api/326265>\
**Category:** Questions\
**Tags:** bug:unconfirmed\
**Created:** [November 3, 2026, 1:11pm UTC](https://community.n8n.io/t/http-request-node-returns-401-unauthorized-when-trying-to-send-animation-or-document-video-via-telegram-bot-api/326265 "2026-11-03T13:11:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abd2001](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@abd2001](https://community.n8n.io/u/abd2001)\
**Post date:** [November 3, 2026, 1:11pm UTC](https://community.n8n.io/t/http-request-node-returns-401-unauthorized-when-trying-to-send-animation-or-document-video-via-telegram-bot-api/326265/1 "2026-11-03T13:11:28Z")

</div>

Hello everyone,  
​I am facing a persistent technical issue in n8n and need some expert guidance. I tried searching everywhere for a working solution or a direct support channel, but community forum posting is the proper way, so I am sharing my complete setup and troubleshooting steps here.  
​My Objective:  
I am trying to trigger and send an animated GIF (loading indicator) to a Telegram chat using an n8n workflow.  
​What I Have Done & Tried:  
​HTTP Request Node Setup: I configured an HTTP Request node to call the Telegram Bot API directly.  
​API Endpoint & Methods: I tested using the sendAnimation method endpoint ([https://api.telegram.org/bot](https://api.telegram.org/bot)\<MY\_TOKEN\>/sendAnimation).  
​Parameters Passed:  
​Bot Token: 1858692658:AAOumvIWQubZBW4UJLCnBAKxUchA9oOHNA4  
​Chat ID: 856862658  
​File ID: AAMCBAADGQEDrWMvaumV5aK5cOTW4VtjPu\_dy-BXgTIAAgseAAKaz1FTqupGoa\_fxJIBAAdtAAM9BA  
​The Problem:  
Every single time I execute the node, it consistently fails with a 401 Unauthorized error (Authorization failed - please check your credentials), even though the Bot Token and Chat ID are completely correct and verified.  
​Could someone please point out what might be wrong with my URL formatting, authentication header placement, or body parameters in the n8n HTTP Request node when calling Telegram’s sendAnimation?  
​Thank you so much for your help!

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [November 3, 2026, 1:18pm UTC](https://community.n8n.io/t/http-request-node-returns-401-unauthorized-when-trying-to-send-animation-or-document-video-via-telegram-bot-api/326265/2 "2026-11-03T13:18:38Z")

</div>

Hi @abd2001

Your bot token is visible in this post. Revoke it through @BotFather, generate a replacement for the same bot, update n8n, and remove the exposed token from the post.

First test the replacement in an HTTP Request node:

- Method: GET
- URL: `https://api.telegram.org/bot<NEW_TOKEN>/getMe`
- Authentication: None
- Send Headers: off
- Send Body: off

Replace `<NEW_TOKEN>` completely, including the brackets, while keeping the `bot` prefix. Telegram authenticates through that URL; getMe needs no chat or file parameters.

After it returns `ok: true`, use POST with `https://api.telegram.org/bot<NEW_TOKEN>/sendAnimation`. Enable Send Body, select Body Content Type JSON, and pass `chat_id` and `animation`. The animation value must be an animation file\_id belonging to the same bot.

If getMe still returns 401, share its response body with secrets removed.

> **[getMe - Telegram Bot API](https://core.telegram.org/bots/api#getme)**
>
> A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object. | The Bot API is an HTTP-based interface created for developers keen on building bots for...

---

<div class="post-metadata">

**Author:** ![Livinus\_Okoz](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/livinus_okoz/32/197044_2.png) [@Livinus\_Okoz](https://community.n8n.io/u/Livinus_Okoz)\
**Post date:** [November 3, 2026, 3:57pm UTC](https://community.n8n.io/t/http-request-node-returns-401-unauthorized-when-trying-to-send-animation-or-document-video-via-telegram-bot-api/326265/3 "2026-11-03T15:57:54Z")

</div>

A 401 Unauthorized error on the Telegram Bot API usually indicates that whitespace was accidentally introduced into the bot token string within the URL path or that an authorization header is conflicting with the path token. Double-check that your expression evaluating the bot token trims any leading or trailing spaces. Let me know how your HTTP Request node parameters and headers are currently structured and I can outline the exact payload mapping right here.

---

<div class="post-metadata">

**Author:** ![BenRon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/benron/32/197091_2.png) [@BenRon](https://community.n8n.io/u/BenRon)\
**Post date:** [November 4, 2026, 12:03am UTC](https://community.n8n.io/t/http-request-node-returns-401-unauthorized-when-trying-to-send-animation-or-document-video-via-telegram-bot-api/326265/4 "2026-11-04T00:03:07Z")

</div>

A 401 from Telegram means the bot token is being rejected, so check it first with a plain getMe call. Also, your token is visible in the post, so revoke it in BotFather now and use the new one. Worth knowing too that a file\_id only works for the same bot that received that file.
