Telegram error 400: Bad Request: file is too big
Last verified against Telegram Bot API reference
Bad Request: file is too bigWhat error 400 means
The file you tried to send or fetch exceeds the Bot API size limits. Telegram documents several ceilings: when you pass an HTTP URL, photos are limited to 5 MB and other content to 20 MB; when you upload via multipart/form-data, photos are limited to 10 MB and other files to 50 MB; and getFile can only download files up to 20 MB. The same description is returned on both the sending and the downloading side.
Running your own local Bot API server lifts these limits (uploads up to 2000 MB and downloads without a size limit), but the hosted api.telegram.org endpoint enforces them strictly.
Nothing about the chat, the token or the format is wrong. The file is simply larger than the hosted API will accept.
What it looks like
{"ok":false,"error_code":400,"description":"Bad Request: file is too big"}Why it happens
- Sending a video or archive over 50 MB through the hosted API.
- Sending a photo over 10 MB (upload) or 5 MB (URL) as a photo rather than as a document.
- Calling
getFileon a file a user sent that is larger than 20 MB. - A URL that serves a much larger file than expected.
How to fix Telegram error 400
- 1Check the byte size before sending and choose a path: compress, split, or send a link to the file instead.
- 2Send large images as documents (50 MB upload limit) rather than photos when quality matters.
- 3For downloads over 20 MB, run a local Bot API server or ask the user to share via a link.
- 4For broadcast assets, upload once and reuse the
file_id; file_ids are not subject to the URL-size limits.
How to stop it recurring
Validate sizes against the documented limits in your upload pipeline and surface a clear message to users when a file cannot be relayed. Keep the exact numbers in one place; see the Telegram limits reference. If your product routinely moves files over 20 MB in or out, plan for a self-hosted Bot API server from the start.
Note the asymmetry that surprises people: a user can send your bot a 1 GB video (their client uploads it), but your bot cannot fetch it back through getFile on the hosted API because of the 20 MB download ceiling. The same limits page also covers photo geometry rules, which reject images independently of byte size.
Official reference: Telegram Bot API reference. See all Telegram error codes or the Telegram limits and quotas.
Related codes
Error 400 - quick answers
What does Telegram error 400 mean?
The file you tried to send or fetch exceeds the Bot API size limits. Telegram documents several ceilings: when you pass an HTTP URL, photos are limited to 5 MB and other content to 20 MB; when you upload via multipart/form-data, photos are limited to 10 MB and other files to 50 MB; and getFile can only download files up to 20 MB. The same description is returned on both the sending and the downloading side.
How do I fix Telegram error 400?
1. Check the byte size before sending and choose a path: compress, split, or send a link to the file instead. 2. Send large images as documents (50 MB upload limit) rather than photos when quality matters. 3. For downloads over 20 MB, run a local Bot API server or ask the user to share via a link. 4. For broadcast assets, upload once and reuse the file_id ; file_ids are not subject to the URL-size limits.
Should I retry after error 400?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Telegram by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.