SessionBridge : Pure-PHP library to convert and bridge Telegram sessions between popular client formats ( Telethon , Pyrogram , Tdata , MadelineProto ) and LiveProto ( LP )
🔥 SessionBridge focuses on compatibility, reliability, and realistic production use. It provides a unified API and CLI to read, validate, convert, and export session / auth data across different implementations of Telegram's MTProto ecosystem
- Convert sessions between Telethon , Pyrogram , MadelineProto , Tdata ( Telegram Desktop ) and LiveProto ( LP ) formats
- High-fidelity mapping of session fields where possible ( dc_id , ip , port , auth_key )
- Simple, chainable PHP API and a practical command-line interface ( CLI )
Note : SessionBridge is a translator / bridge between session file formats ( or text of session ) it does not reimplement MTProto or perform network login for you. Use a proper client library ( MadelineProto , LiveProto , Telethon , Pyrogram ) to perform active logins and connection flows
Install via Composer :
composer require taknone/sessionbridgeOr include directly in your project autoload
<?php
require_once 'vendor/autoload.php';
use function Tak\SessionBridge\from_madelineproto_string;
use function Tak\SessionBridge\to_liveproto_sqlite;
$sessions = from_madelineproto_string('session.madeline');
foreach($sessions as $session){
var_dump(to_liveproto_sqlite($session));
}
?>- convert telethon.session file to LiveProto file
php vendor/bin/sessionbridge --from telethon-sqlite --to liveproto-sqlite --session telethon.session- Telethon ( .session SQLite / String )
- Pyrogram ( .session SQLite / String )
- MadelineProto ( PHP session arrays / serialized files )
- Tdata ( Telegram Desktop profile folder , extract relevant files )
- LiveProto ( LP ) ( first-class citizen , SessionBridge is linked and can export / import LP files )
If you need support for additional session types open an issue or contribute an adapter
| Type | From | To |
|---|---|---|
| LiveProto String | ✅ | ✅ |
| LiveProto SQLite | ✅ | ✅ |
| Telethon String | ✅ | ✅ |
| Telethon SQLite | ✅ | ❌ |
| Pyrogram String | ✅ | ✅ |
| Pyrogram SQLite | ✅ | ❌ |
| Madeline String | ✅ | ❌ |
| Tdata | ✅ | ❌ |
SessionBridge is released under the AGPLv3
If you need help, open an issue or discuss changes via pull requests. For sensitive security issues, use the repository's security contact
- Email : MRTakNone@gmail.com
- Telegram : https://TakNone.t.me
🎊 Happy bridging !