Open ghost opened 7 years ago
In my experience I re register the user and then the code worked fine.
Here is the working code of mine
var store = new FileSessionStore();
client = new TelegramClient(int.Parse(textBox1.Text), textBox2.Text, store);
await client.ConnectAsync();
if (client.IsUserAuthorized())
{ you are set }
else
{ go and autenticate}
Hi, I get this exception: InvalidOperationException: AUTH_KEY_UNREGISTERED
client.IsUserAuthorized() returns true.
StackTrace " at TLSharp.Core.Network.MtProtoSender.HandleRpcResult(UInt64 messageId, Int32 sequence, BinaryReader messageReader, TLMethod request) in C:\\Users\\Harmen\\Desktop\\MyApp\\TLSharp-master\\TLSharp.Core\\Network\\MtProtoSender.cs:line 318" string
Windows Form
Connect method (try to load session from file)
Authentification
Try to get message history of certain channel (this is my goal)
If I skip the IsUserAuthorized check and go straight to makeAuthSync() and I put the recieved code via the debugger in the code than I get InvalidOperationException: Couldn't read the packet length
StackTrace " at TLSharp.Core.Network.TcpTransport.<Receieve>d__4.MoveNext() in C:\\Users\\Harmen\\Desktop\\MyApp\\TLSharp-master\\TLSharp.Core\\Network\\TcpTransport.cs:line 45" string
Any advice is welcome :)