Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The api_id/api_hash combination is invalid (caused by SendCodeRequest) #1056

Closed
geeklingo opened this issue Nov 30, 2018 · 2 comments
Closed

Comments

@geeklingo
Copy link

With newer bots, this issue seems to have returned. If the bot api was recently created (9-digits) the code no longer works and gives the following error:

Traceback (most recent call last): File "cbt.py", line 51, in <module> telegramClient.start() File "/usr/lib64/python3.6/site-packages/telethon/client/auth.py", line 114, in start else self.loop.run_until_complete(coro) File "/usr/lib64/python3.6/asyncio/base_events.py", line 468, in run_until_complete return future.result() File "/usr/lib64/python3.6/site-packages/telethon/client/auth.py", line 148, in _start sent_code = await self.send_code_request(phone, force_sms=force_sms) File "/usr/lib64/python3.6/site-packages/telethon/client/auth.py", line 374, in send_code_request phone, self.api_id, self.api_hash)) File "/usr/lib64/python3.6/site-packages/telethon/client/users.py", line 60, in __call__ result = await future telethon.errors.rpcerrorlist.ApiIdInvalidError: The api_id/api_hash combination is invalid (caused by SendCodeRequest) Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7fa9f65b8128>

Using the same code but older bot API (6-digits) it works fine.

@Lonami
Copy link
Member

Lonami commented Nov 30, 2018

There's not much we can do to solve that besides Telegram fixing it.

@Lonami Lonami closed this as completed Nov 30, 2018
@Lonami
Copy link
Member

Lonami commented Oct 28, 2022

#836 has more details.

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

No branches or pull requests

2 participants