- Visit Telegram Apps API and login with your Telegram Account.
- Fill out the form to register a new Telegram application.
- After registration you get an API key. It consists of two parts:
api_id
andapi_hash
- set those as env variables to$API_ID
and$API_HASH
(you can save them for persistence to.env
file). - Run the app interactively:
docker run -e API_ID -e API_HASH -i ghcr.io/qqalexqq/tgforwarderclient:latest export
- Input your data:
Is "+9876543210" correct? (y/N): y
The confirmation code has been sent via Telegram app
Enter confirmation code: 123456
The two-step verification is enabled and a password is required
Password hint: None
Enter password (empty to recover): verysecurepassword
---
abcdefghijklmnopqrstuvwxyz (ver long string)
-
Copy the last long string from the output. Set it to an env var
$SESSION_KEY
. -
Set forwarding variables in docker-compose.yml:
BOT_CHANNELS
(from where we forward) andBOT_CHATS
(to which chats we forward). Examples are provided in the file. -
After all things done you can start the container:
docker-compose build
docker-compose up -d
with docker...
docker run ghcr.io/qqalexqq/tgforwarderclient --help
... or as python module
python3 -m tgforwarderclient --help