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.


Solution 1:

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.