Skip to content
Discussion options

You must be logged in to vote

The 50 MB limit is imposed by the hosted Telegram Bot API, not by tgbot-cpp. There are three distinct cases:

  1. Pass an existing Telegram file_id: Telegram reuses the stored file, so it is not uploaded again.
  2. Upload a new file to api.telegram.org: general files are limited to 50 MB.
  3. Run the official local telegram-bot-api server: uploads are supported up to 2000 MB and downloads have no size limit.

For the local server, point the third Bot constructor argument to it:

TgBot::CurlHttpClient httpClient;
TgBot::Bot bot(token, httpClient, "http://localhost:8081");

localhost:8081 is only an example; the official server must be installed, configured and listening on that address.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by reo7sp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants