ilyalatt / Telega

C# Telegram MTProto Client
https://ilyalatt.github.io/Telega/
MIT License
58 stars 15 forks source link

Connecting with Stored Sessions #26

Closed wasimjee closed 4 years ago

wasimjee commented 4 years ago

How can we connect using stored sessions from session.dat file

for

await TelegramClient.Connect()

ilyalatt commented 4 years ago

You can use await TelegramClient.Connect(ApiId, new FileSessionStore("session_file_name")) for multiple accounts. If you need a different way to work with sessions, you can implement custom ISessionStore (Load and Save methods) and pass it instead of FileSessionStore.

wasimjee commented 4 years ago

Thanks done