tdlib / telegram-bot-api

Telegram Bot API server
https://core.telegram.org/bots
Boost Software License 1.0
2.94k stars 569 forks source link

HELP WITH TELEGRAM-BOT-API #569

Open hatikoX opened 2 months ago

hatikoX commented 2 months ago

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

levlam commented 2 months ago

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.

hatikoX commented 2 months ago

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?

levlam commented 2 months ago

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