TelegramIndex-Fork/app/generate_session_string.py

9 lines
271 B
Python
Raw Normal View History

2020-08-10 09:35:47 +02:00
from telethon.sync import TelegramClient
from telethon.sessions import StringSession
api_id = int(input("Enter your API_ID: "))
api_hash = input("Enter your API_HASH: ")
with TelegramClient(StringSession(), api_id, api_hash) as client:
print(client.session.save())