sochix / TLSharp

Telegram client library implemented in C#
1k stars 380 forks source link

USER_DEACTIVATED exception after authentication #615

Open andreysolovyov opened 7 years ago

andreysolovyov commented 7 years ago

I'm using a simple client for Telegram API on C# using TLSharp library.

`var appId = ConfigurationManager.AppSettings["appId"];

var appSecret = ConfigurationManager.AppSettings["appSecret"]; var clientPhone = ConfigurationManager.AppSettings["clientPhone"]; ... var session = new FileSessionStore(); client = new TelegramClient(int.Parse(appId), appSecret, session, clientPhone); await client.ConnectAsync(); if (!client.IsUserAuthorized()) { hash = await client.SendCodeRequestAsync(clientPhone); await client.MakeAuthAsync(clientPhone, hash, code); } var state = await client.SendRequestAsync(new TLRequestGetState());`

Here I'm getting exception USER_DEACTIVATED.

So, I tried to get new clean account (with new phone number), login throgth mobile telegram client, after that login to web version, searched some channels, subscribe, sent some messages. After that I tried to login with my client app and at FIRST request got same error.

This issue started to reproduce just this week. Before that I successfully used several test accounts, getting messaged, worked with media and dialogs, no any deactivate errors.

What I'm doing wrong? What limits or policies was broked my application and does exists any way to restore my app?

knocte commented 7 years ago

We don't know. You might want to contact Telegram to know about their new policies?

andreysolovyov commented 7 years ago

They are not responding to my emails. Official documentaion is absent. Do you have any idea how telegram server decides which account to deactivate and which not?

knocte commented 7 years ago

I don't have.

fofgogjoj commented 5 years ago

are there any solutions? same problem.