skip to Main Content

I’m Trying To Download Files Sent To My Bot To My Own Server.
I Used The "getFile?file_id=the_file_id" To Get The "file_path" But This Is The Error I’m Getting.
I Found A Lot Of Bots On TELEGRAM Working Without Any Issue.

{'ok': False, 'error_code': 400, 'description': 'Bad Request: file is too big'}

2

Answers


  1. BOTAPI has filesize restrictions,
    use 3rd party libraries like telethon, pyrogram

    Login or Signup to reply.
  2. The quota is put by the Bot API (see here). You can think of the BOT API as some adapter layer between Bots and the actual Telegram protocol. It’s there to make bot developers live easier (by exposing HTTP end-points to invoke via HTTP instead of dealing with all the cryptographic computations, various schema, etc.. required to access the telegram protocol directly).

    However, you can skip that intermediary layer and directly connect your bot with telegram (via MTPROTO protocol) to not be restricted by most of the quota limitations of the HTTP BOT Api.

    There are various libraries out-there you might use to do just that.

    like: Telethon & Pyrogram (python), MadelineProto (php), @mtproto/core (js), etc..

    If you use any of such libraries, you should be able to upload/download upto 2GB of files (just like regular users) in contrast to the 20Mb/50mb limit by the Official HTTP Bot API.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search