Skip to main content

tgmint

tgmint

Make your Telegram scripts connect as the real Telegram app, and avoid bot detection.

PyPI Python tests MIT

  • 🕵️ Looks like the official app. Telethon and Pyrogram connect with the official Telegram Desktop, Android or iOS identity instead of announcing themselves as a script.
  • 🔑 Passkey login. Log in with a file instead of an SMS code. No other Telegram library supports this.
  • 🔁 Any session, any library. Convert between tdata, Telethon, Pyrogram and GramJS, or import from the Android app. Offline.
  • 🧩 Works with every major framework. Telethon, kurigram, pyrofork and hydrogram in Python; GramJS, MadelineProto and anything else through the CLI's --json output.

Why it matters

Telegram automatically puts accounts on unofficial API clients under observation, and your library tells Telegram exactly what it is:

Telegram sees Telethon Pyrogram tgmint
App ID your own your own Telegram Desktop's official one
Device PC 64bit CPython 3.12.3 ASUS MB
System 6.17.9 Linux 6.17.9-76061709-generic Windows 11 x64
App version 1.45.0 Pyrogram 2.2.26 7.3.3 x64

tgmint's identities are current (checked weekly against the official apps), consistent (no impossible device and version combinations), and stay the same on every login.

Quick start

pip install "tgmint[passkeys]"
from tgmint.api import API
from tgmint.tl import TelegramClient

client = TelegramClient("me.session", api=API.TelegramDesktop.Generate(unique_id="me"))
from tgmint.passkeys import register_passkey, login_with_passkey

await register_passkey(client, path="me.passkey")             # once
me = await login_with_passkey(new_client, path="me.passkey")  # later: no phone, no SMS
tgmint convert --from tdata/ --from-format tdata --to me.session --to-format telethon-session

Also included: QR-code login, one-file encrypted account backups, automatic repair of logged-out sessions, and a CLI for everything.

Docs

Getting started · How it works · Passkeys · CLI · API reference · Supported libraries

Responsible use

For your own accounts only. tgmint has no multi-account tools. It removes the signals that mark your client as a script, but it can't guarantee how Telegram treats an account.


MIT · Continues thedemons/opentele (what changed) · Contributing

Metadata

Release files for tgmint 1.18.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tgmint 1.18.1
File Size Uploaded Provenance Actions
tgmint-1.18.1.tar.gz 321.0 kB Without provenance Details for tgmint-1.18.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tgmint 1.18.1
File Interpreter ABI Platform Actions
tgmint-1.18.1-py3-none-any.whl Python 3 none any Details for tgmint-1.18.1-py3-none-any.whl

Total release size: 646.3 kB

Release files / tgmint-1.18.1.tar.gz

Download URL tgmint-1.18.1.tar.gz
Size 321.0 kB
Tags Source
SHA-256 checksum
How to use checksums
070d80fb867c9e0663774fa47a5d540cc486f22f60e6ad798df4a0d0e8c1170c
BLAKE2b-256 checksum
How to use checksums
f4e7011d490dd967247f10604403b88c855b5df840190b7047a7104650c996c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / tgmint-1.18.1-py3-none-any.whl

Download URL tgmint-1.18.1-py3-none-any.whl
Size 325.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
371c8010a54421c4bcdf43f469cd795b9709643c7beaabfbd916e20b0047e71e
BLAKE2b-256 checksum
How to use checksums
fad972978323ba2c86f9e7e27de354b291677b9a9c0bc504dd7d12a08d4a8eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for tgmint 1.18.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.18.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page