Search by

taknone / sessionbridge

TakNone

Migrate your Telegram session safely between libraries

Package info

github.com/TakNone/SessionBridge

Homepage

Type:project

pkg:composer/taknone/sessionbridge

Statistics

Installs: 349

Dependents: 0

Suggesters: 0

Stars: 7

Open Issues: 0

v1.0.2 2026-05-30 21:22 UTC

This package is auto-updated.

Last update: 2026-08-30 22:02:18 UTC


README

logo 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

Key features

  • 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

Installation

Install via Composer :

composer require taknone/sessionbridge

Or include directly in your project autoload

Quick start

PHP

<?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));
}

?>

CLI

  • convert telethon.session file to LiveProto file
php vendor/bin/sessionbridge --from telethon-sqlite --to liveproto-sqlite --session telethon.session

Supported formats

  • 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 ✅ ❌

License

SessionBridge is released under the AGPLv3

Contact

If you need help, open an issue or discuss changes via pull requests. For sensitive security issues, use the repository's security contact

🎊 Happy bridging !