Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid Telegram's file size limit

Telegram bots have a 20MB size limit for files, i was wondering if it was possible to avoid it in python, especially with the pyTelegramBotAPI module. I found a similar question here on stackoverflow but it wasn't using python.

like image 518
alice percoco Avatar asked Dec 17 '25 23:12

alice percoco


1 Answers

These file size limits are set for the Telegram Bot API. So I wouldn't recommend using the pyTelegramBotAPI module for your purpose. Rather use the Telegram API, which uses the MTProto protocol rather than Bot API endpoints. This allows for maximum file sizes of 2GB.

Modules such as telethon or pyrogram allow to create bots that use MTProto.

like image 172
RJ Adriaansen Avatar answered Dec 20 '25 15:12

RJ Adriaansen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!