Telegram Get File: "invalid file_id" even for new bots and direct uploads (API issue?)

Hi all,

I’m experiencing a persistent issue with the Telegram Bot API (getFile method) and I want to check if others face the same.

Problem:
Whenever I send a PDF file directly to my new bot and try to use the getFile API method with the received file_id, Telegram responds with
{"ok":false,"error_code":400,"description":"Bad Request: invalid file_id"}
even though the file was just uploaded and the file_id is copied directly from the incoming message.

What I’ve tried:

  • Created a new bot (fresh BotFather token)
  • Created new credentials in n8n, tested from different machines and clean workflows
  • File is sent directly (not forwarded, not copied)
  • Same error via both n8n node and direct cURL call to Telegram API
  • Example cURL:

nginx

КопироватьРедактировать

curl "https://api.telegram.org/bot8076085734:AAFo-*****-ikOyv324/getFile?file_id=BQACAgIAAxkBAAMdCqDlj7bXzPIS-NNQES3u4XdAFE4aAAsAgA6rsk89P3aj5Ke3MlQ2BAA"

(token is masked for security)

  • Always the same error: invalid file_id

Sample incoming payload:

json

КопироватьРедактировать

{
  "file_id": "BQACAgIAAxkBAAMdCqDlj7bXzPIS-NNQES3u4XdAFE4aAAsAgA6rsk89P3aj5Ke3MlQ2BAA",
  "file_name": "5_промптов_для_копирайтеров_в_разных_нишах_.pdf",
  "from": {"username":"Rod_Bear"}
  // rest of the message...
}

Questions:

  • Is anyone else seeing this with new bots or fresh uploads?
  • Is there a new limitation, bug, or required setting for file access in Telegram bots?
  • Any known fixes or workarounds?

Thanks for any advice or confirmation!
Screenshots of error and workflow are attached below.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.