Telethon: send_code_request not sending SMS
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 a duplicate.
- I ran
pip install -U https://github.com/LonamiWebs/Telethon/archive/master.zip
and triggered the bug in the latest version.
Code that causes the issue
from telethon.sync import TelegramClient
session_path = Path("sessions")
if not session_path.exists():
session_path.mkdir()
phone_number = get_phone_number()
client = TelegramClient(f"sessions/{phone_number}", api_id, api_hash, proxy=proxy)
async def main():
await client.connect()
await client.send_code_request(f"+{phone_number}", force_sms=True)
verification_code = get_verification_code()
await client.sign_up(verification_code, names.get_first_name(), names.get_last_name())
await client.disconnect()
client.loop.run_until_complete(main())
Traceback
Traceback (most recent call last):
verification_code = get_verification_code() <- stuck here, since no SMS is being received
The send_code_request is sent successfully, however … no SMS is sent. The phone number is definitely not used … is there something new on the library I had forget?
Thanks in advance!
UPDATE: I double checked the phone number right now with the Telegram App itself … and the Code was sent?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 24 (3 by maintainers)
Please do not publicly share other people’s API IDs and hashes. They should be kept secret. I have edited it with a random hash to prevent abuse.
I have the same problem that when creating an account the SMS or call are not delivered
new report 😃
i de-compile original app and recompile it , but telegram raised error again because they check apk signature. so we need fetch original sign maybe using frida