pythonsessiontelegramtelethonpyrogram

How to use telethon session file to login with pyrogram


After logging in to my telegram account with Telethon it generates a .session file. I need to use that file to login to the same account but with Pyrogram instead of telethon.

But telethon and pyrogram sessions files have different structures and pyrogram doesn't support telethon session files and vice-versa. The same thing applies on session strings.

How can I login using Pyrogram to an account that is already logged in to Telegram using Telethon ?


Solution

  • I found this tool that solved my problem https://github.com/HKPROJECTS/session-conv-bot

    it converts Telethon session file to a Pyrogram session file