Closed jefferyleo closed 6 years ago
Have same issue. clientApi.AuthService. SendCodeAsync(phone)
is broken and return object with property PhoneRegistred = false
witch leads error after that. My phone is registred and previously I use another telegram library well.
Ok my problem was in wrong rsa public key. Here right one.
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAwVACPi9w23mF3tBkdZz+zwrzKOaaQdr01vAbU4E1pvkfj4sqDsm6
lyDONS789sVoD/xCS9Y0hkkC3gtL1tSfTlgCMOOul9lcixlEKzwKENj1Yz/s7daS
an9tqw3bfUV/nqgbhGX81v/+7RFAEd+RwFnK7a+XYl9sluzHRyVVaTTveB2GazTw
Efzk2DWgkBluml8OREmvfraX3bkHZJTKX4EQSjBbbdJ2ZXIsRrYOXfaA+xayEGB+
8hdlLmAjbCVfaigxX0CDqWeR1yFL9kwd9P0NsZRPsmoqVwMbMu7mStFai6aIhc3n
Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
-----END RSA PUBLIC KEY-----
I am starting to digging dipper in library... prepare :D
I am having the same issue, still unable to resolve.
What's the correct phone format to use? With or without +
at the beginning?
How do you provide the RSA public key? With header/footer, or without? Does line ending character matter?
@vik-borisov @kosmakoff As I understood it's happening accidentally. For example right now it's totally broken for me. I think this library is unstable now. But if library would support channel and user updates it will be really delicious.
Actually, I managed to resolve it somehow. I have deleted the binary output of my console app, along with session.dat
file inside of it. Then I reran the program and it worked. Probably something on server side needs some time to initialize, that's why first session.dat
becomes corrupted. Not sure what the real problem is though.
If you will have positive experience and working example of sending/receiving leave PR in documentation to this library. It’s just a headache now.
Finnally. You just get banned after three “sentCode” requests. You need to save property hashCode and code in file.
Thread can be closed.
May I know what's the issue that could cause the SignInAsync has the exception error with the PHONE_NUMBER_UNOCCUPIED as seen in the image above? From what I search from Telegram Error Website, it shows that
PHONE_NUMBER_UNOCCUPIED: The phone number is not yet being used
The image above showing my PhoneRegistered with false value, but my phone number has already registered with Telegram Account which I'm able to use it in my phone.