Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Authorization problems #1025

Open
Alitrix opened this issue Apr 29, 2021 · 0 comments
Open

Authorization problems #1025

Alitrix opened this issue Apr 29, 2021 · 0 comments

Comments

@Alitrix
Copy link

Alitrix commented Apr 29, 2021

I wrote a program using your library, but each time it runs it needs to perform the sequence
1.telegramClient = new TelegramClient(m_pApiId, m_pApiHASH);
2.telegramClient.ConnectAsync(reconnect);
3.telegramClient.SendCodeRequestAsync(phone);
4.telegramClient.MakeAuthAsync(m_pPhone, m_pHash, m_pCode);

I got locked for 80000+ seconds after my 10th launch while debugging the app, your description says authorization is required if there is no session.dat file, I checked
The file in the directory with the program was created. Tried to perform authorization in another way:
1.telegramClient = new TelegramClient(m_pApiId, m_pApiHASH);
2.telegramClient.ConnectAsync(reconnect);
3.telegramClient.GetContactsAsync();
But I got an error ("29.04.2021 10:16:16::AUTH_KEY_UNREGISTERED"). i.e. every time I run the application, I need to ask for code and register it ?
added the .IsUserAuthorized check to the program before requesting the code, its state True, but the error again.

Please tell me which scenario of authorization behavior is correct? What is the sequence of

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant