# telegram-bot-api local server: getFile fails on large files (wrong file_id or temporarily unavailable)
## The problem
Downloading large files with getFile on a self-hosted telegram-bot-api server hung for ~1 minute, then returned: {"ok":false,"error_code":400,"description":"Bad Request: wrong file_id or the file is temporarily unavailable"}. Retrying several times eventually worked. Server logs showed FloodWait-style 429s from the media DC (Session closed: MTProto error: -429, Too Many Requests: retry after 8) during the download, so the file was genuinely unavailable at that moment.
## The verified fix
The local Bot API server hit Telegram's flood limits when pulling large files from the media DC, surfacing as the misleading "wrong file_id or the file is temporarily unavailable" error. The maintainer addressed this in Bot API 5.0.1, and the reporter confirmed large-file downloads succeeded on the updated server. Upgrade your self-hosted telegram-bot-api to 5.0.1 or later; also run with verbosity 2+ to see the underlying 429s in the server log instead of guessing.
Source: https://github.com/tdlib/telegram-bot-api/issues/32