telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

HELP WITH TELEGRAM-BOT-API

Open strvdev opened this issue 1 year ago • 3 comments

Hello, I want to do bot who can accept files larger than 20mb.I read documentation, but I don't understand how use this telegram-bot-api. If someone can explain or give me manual with examples

please

strvdev avatar Apr 14 '24 05:04 strvdev

You will have an executable file after following https://github.com/tdlib/telegram-bot-api?tab=readme-ov-file#installation.

Then, you can run the executable on your server as described in https://github.com/tdlib/telegram-bot-api?tab=readme-ov-file#usage.

Then, you can send request to http://localhost:8081 instead of https://api.telegram.org, and if the server is run in local mode, then it will be able to download files of any size.

levlam avatar Apr 14 '24 20:04 levlam

I print in terminal: Telegram-bot-api --api-id=myid --hash-id=myhash --local

But when i sent this terminal the terminal is silent but it’s clear that the process has started, I tried to send a file larger than 20 MB after that, but the bot also crashed with error 400. Maybe I need to change something with the code?

strvdev avatar Apr 15 '24 04:04 strvdev

You must sent requests to to http://localhost:8081/ instead of https://api.telegram.org/.

levlam avatar Apr 15 '24 10:04 levlam