Documentation menu
Getting started
New in v2.0
Feature deep dives
Reference
Telegram Credentials
Telegram Credentials & Session Setup
Step-by-step instructions to obtain Telegram API ID/Hash, create a manager bot with BotFather, and connect Pyrogram user sessions.
Verified against the checkout built for v2.2.4 · updated 20 Oct 2026
Overview
AutoTelegramForward uses a hybrid model:
- Telegram Bot Token: Powers the interactive inline button UI (
/settings,/profile, rule management). - User MTProto Sessions: Enables reading and forwarding from private channels, public channels, and groups where external bots are not permitted to join.
Step 1: Obtain API ID & API Hash
- Log in to the official Telegram portal at my.telegram.org using your Telegram phone number.
- Click on API development tools.
- Create a new application by filling in an App title and Short name (e.g.,
ATF Forwarder). - Copy your api_id (an integer like
12345678) and api_hash (a 32-character hex string).
Step 2: Create Manager Bot with @BotFather
- Open Telegram and start a chat with the official @BotFather.
- Send the command
/newbot. - Choose a friendly display name (e.g., ATF Manager) and a unique username ending in
bot. - Copy the HTTP API token provided (e.g.
1234567890:ABCdef...). This is yourTELEGRAM_BOT_TOKEN.
Step 3: Discover Your Numerical User ID
Telegram usernames can change, so AutoTelegramForward uses permanent 64-bit numerical IDs for admin authentication.
- Message @userinfobot on Telegram.
- Note down your numerical
Id(e.g.5094837833). - Assign this to
ADMIN_USER_IDin your.envfile.
Step 4: Connect MTProto User Sessions
Once the core service is started:
- Open your newly created manager bot on Telegram and send
/start. - Click on 👤 حسابهای کاربری (Accounts / Sessions).
- Click ➕ افزودن اکانت جدید to connect an account via QR code or phone verification code.
- The session is securely stored inside the isolated
sessions/volume.