telegram-s / telegram-api-old

Telegram Api library for java
MIT License
138 stars 64 forks source link

API Saving Authentication #22

Open anvaya opened 10 years ago

anvaya commented 10 years ago

Hi,

We have observed that with various telegram clients (CLI, Webogram) you can log in, close the apps and come back and you will be still logged in.

There does not seem to be any documentation available on how to do this in the java API. How to achieve this so that we do not have to send SMS code verifications each time ?

jmoral commented 10 years ago

I checked sources and used setAuthKey and getAuthKey in AbsApiState. I am not sure if that is the right way to do it.

alexkvak commented 10 years ago

you need to serialize/unserialize the whole ApiState object when you start/close your app

Raakh commented 8 years ago

Can you please send me compiled working code to my email ghayel@gmail.com? I shall be grateful to you