Xurvan
Xurvan

Reputation: 198

Manage sessions with Telegram TL

I want to do following:

  1. List all sessions
  2. Get date and time that each session sign-ined
  3. Terminate unwanted sessions

I read official telegram document and this unofficial, but I couldn't find anything. I looking for something like "getSessions".

Upvotes: 0

Views: 540

Answers (1)

tashakori
tashakori

Reputation: 2441

you can do these steps:

  1. call the below api: account.getAuthorizations#e320c158 = account.Authorizations;

  2. use date_created and date_active of the Authorization object. (#7bf2e6f6)

  3. call the below api by providing your desired session's hash:

    account.resetAuthorization#df77f3bc hash:long = Bool;

you're done!

Upvotes: 1

Related Questions