Client Configuration#
The Client class is the central orchestrator for interacting with Telegram MTProto.
Constructor Parameters#
Parameter |
Type |
Description |
|---|---|---|
|
|
Session identifier (stores |
|
|
Telegram API ID from my.telegram.org. |
|
|
Telegram API Hash from my.telegram.org. |
|
|
Bot Token from |
|
|
In-memory string session for serverless deployments. |
|
|
If True, session is stored entirely in memory (no disk file created). |
|
|
Working directory for session files. |
|
|
SOCKS5 / SOCKS4 / HTTP proxy dictionary. |
Example#
from ftmgram import Client
# Standard Bot Session
app = Client(
"my_bot",
api_id=12345,
api_hash="0123456789abcdef0123456789abcdef",
bot_token="123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
)