Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can Downloading a big fIle from Telegram bot API

Ok, I know in telegram bot API we can get the file_id and send it to getFile method and it will give us the file path so we can download it with an URL.

BUT it has a maximum limit of the file size of 20MB for each file.

Here is my question:

How can this bot bypass the size limitation?

Personally wouldn't believe that until tested it with a 200MB sized file and it worked very fast. I want to make one like that.

like image 955
mohammad fallah.rasoulnejad Avatar asked Oct 24 '25 09:10

mohammad fallah.rasoulnejad


1 Answers

I assume, they bypass this limit by using client api, where getFile method have no size restrictions.

There must be another, "private" bot, that use telegram client api. Public bot just sends file_id (or whole message with attached file by calling forwardMessage) to private bot, which do actual work of downloading files.

like image 141
rufanov Avatar answered Oct 26 '25 23:10

rufanov