aiogram / telegram-bot-api

Docker image of Telegram Bot API Server
https://hub.docker.com/r/aiogram/telegram-bot-api
153 stars 50 forks source link

Telegram API #6

Closed edbek closed 1 year ago

edbek commented 1 year ago

What is TELEGRAM_API_ID and TELEGRAM_API_HASH ? Where to take them? Telegram only has a token.

F0rzend commented 1 year ago

What is TELEGRAM_API_ID and TELEGRAM_API_HASH ? Where to take them? Telegram only has a token.

Read readme please.

Before start, you will need to obtain api-id and api-hash as described in https://core.telegram.org/api/obtaining_api_id and specify them using the TELEGRAM_API_ID and TELEGRAM_API_HASH environment variables

edbek commented 1 year ago

Telegram gives only a token, there is no ID and HASH.

F0rzend commented 1 year ago

Telegram gives only a token, there is no ID and HASH.

IMG_20221006_184857.jpg

seriously?

edbek commented 1 year ago

it is clear that they are introduced here, but where to get them?

F0rzend commented 1 year ago

it is clear that they are introduced here, but where to get them?

Sign up for Telegram using any application. Log in to your Telegram core: https://my.telegram.org. Go to "API development tools" and fill out the form. You will get basic addresses as well as the api_id and api_hash parameters required for user authorization.

dnslin commented 1 year ago
docker run -d -p 8081:8081 --name=telegram-bot-api --restart=always -v telegram-bot-api-data:/var/lib/telegram-bot-api -e TELEGRAM_API_ID=xxxxx -e TELEGRAM_API_HASH=xxxxxxxx -e TELEGRAM_LOCAL aiogram/telegram-bot-api:latest

hello, i would like to ask if the above command can unlock the api restrictions of telegram ?

JrooTJunior commented 1 year ago

hello, i would like to ask if the above command can unlock the api restrictions of telegram ?

@dnslin, the only file size, connections count and https restrictions can be "unlocked" via local Bot API server, just read the Telegram Docs.

Zensonaton commented 9 months ago

For future researchers, this is how you are supposed to run docker image with --local flag:

docker run -d -p 8081:8081 --name=telegram-bot-api --restart=always -v telegram-bot-api-data:/var/lib/telegram-bot-api -e TELEGRAM_LOCAL=1 -e TELEGRAM_API_ID=*** -e TELEGRAM_API_HASH=*** aiogram/telegram-bot-api:latest

Also, a small note: Large files aren't stored on local server.