You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if send_phone.phone_code_hash:
phone_hash = send_phone.phone_code_hash
except errors.RPCError as e:
return {'status':'error', 'msg':e.message}
except Exception as e:
return {'status':'error', 'msg':'Авторизация не возможна'}
await client.disconnect()
return {'status':'OK', 'phone_code_hash':phone_hash}
Expected behavior
I'd like auth in TG. I do client.send_code_request(phone) and get auth code
Actual behavior
I'd like auth in TG. I do client.send_code_request(phone) and get "phone_code_hash" But code in telegram doesn't come. It happens sometimes. Especially, I often get this behavior in the evening. Has anyone experienced this?
Traceback
No response
Telethon version
1.24.0
Python version
3.9.16
Operating system (including distribution name and version)
Ubuntu 18.04.6 LTS
Other details
No response
Checklist
The error is in the library's code, and not in my own.
I have searched for this issue before posting it and there isn't an open duplicate.
I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
The text was updated successfully, but these errors were encountered:
Code that causes the issue
tg_ses = TELETHON_DATA_FIELD + str(self.instance.pk)
client = TelegramClient(tg_ses, TELEGRAM_API_ID, TELEGRAM_API_HASH)
await client.connect()
if await client.is_user_authorized():
await client.disconnect()
return {'status':'is_auth'}
phone_hash = ''
try:
send_phone = await client.send_code_request(phone)
except errors.RPCError as e:
return {'status':'error', 'msg':e.message}
except Exception as e:
return {'status':'error', 'msg':'Авторизация не возможна'}
await client.disconnect()
return {'status':'OK', 'phone_code_hash':phone_hash}
Expected behavior
I'd like auth in TG. I do client.send_code_request(phone) and get auth code
Actual behavior
I'd like auth in TG. I do client.send_code_request(phone) and get "phone_code_hash" But code in telegram doesn't come. It happens sometimes. Especially, I often get this behavior in the evening. Has anyone experienced this?
Traceback
No response
Telethon version
1.24.0
Python version
3.9.16
Operating system (including distribution name and version)
Ubuntu 18.04.6 LTS
Other details
No response
Checklist
pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip
and triggered the bug in the latest version.The text was updated successfully, but these errors were encountered: