telegramtelegram-botbad-requesttelegram-webhook

telegram bot api: Bad Request: wrong file_id or the file is temporarily unavailable


Bad Request: wrong file_id or the file is temporarily unavailable

Sometimes when I request a file url from Telegram with the getFile method with a telegram bot api, I get this error that I did not find any explanation for it. If you have information, please benefit me. Thanks


Solution

  • This is the result of contacting t.me/BotSupport:

    I've asked our team to check, they confirmed there is no exact issues with the bot, when getting an error like that, the way to go is to retry after a moment, it should be transient and goes away on it's own.

    Of course, this is while we were sure that the bot sent a file_id that belongs to itself. (and not a file_id of another bot)