Guides
Each guide is one task from start to finish, with every step shown in Python, Node and Rust. Where an ecosystem has no equivalent, its tab says what to use instead. The concepts explain the ideas behind the steps; the reference for Python, Node and Rust lists every name they use.
tdata folders, session strings, .session files and auth keys are logged-in accounts. Work on
copies, never share them and keep them out of logs, issues and commits.
Sessions from tdata
A Telethon string session, or a .session file and its .json companion, from a Telegram Desktop
folder.
An mtcute v3 string session, the Telegram Desktop initConnectionOptions and the crypto provider on
the core.
grammers 0.11 SessionData and connection params, then a live client with the client feature.
Pairs and the way back
Fingerprints and checks
Build a profile, validate its initConnection parameters, read the issues, tz_offset, msg_id
offsets and the transport.
Run the seven consistency checks on a live session, then list, print and terminate the account’s sessions.
Fetch the current client and browser versions, apply a patch, or stay on the built-in set offline.
Headers and full fingerprints with options, screen constraints and seeds, handed to a browser automation tool as plain data.
Before you start
- Install the package for your ecosystem: see Installation.
- The examples load a folder called
tdatanext to the script. Copy the folder of a logged-in Telegram Desktop there; never point a script at the folder Telegram Desktop itself is using. - Python examples import
opentele2, which fetches the current client versions once at import. SetOPENTELE_NO_FETCH=1to stay offline; see Live client versions.