RPCError: API_ID_INVALID
See original GitHub issueI obtained api id and api hash…
Using npx tgession
, I entered the api id and hash but got the following error after I entered my phone number:
? API ID : 1234567
? API HASH : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
? Number : +62821123456789
RPCError: API_ID_INVALID
at Object.RPCMessageToError (/home/nsrb/.npm/_npx/a24890428da1927f/node_modules/telegram/errors/index.js:24:12)
at MTProtoSender._handleRPCResult (/home/nsrb/.npm/_npx/a24890428da1927f/node_modules/telegram/network/MTProtoSender.js:487:36)
at MTProtoSender.<anonymous> (/home/nsrb/.npm/_npx/a24890428da1927f/node_modules/telegram/network/MTProtoSender.js:411:19)
at Generator.next (<anonymous>)
at fulfilled (/home/nsrb/.npm/_npx/a24890428da1927f/node_modules/telegram/network/MTProtoSender.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:94:5) {
code: undefined
}
I use other combinations for phone number (using +, without +, using 0 instead of country code) but it still got the same error.
I doubled checked my API ID and Hash is the same.
my package.json contains “telegram”: “^1.7.15”
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Telegram - Getting AUTH_KEY_UNREGISTERED and ...
Okay so I solved my issue. I chose to use the Logging in as a User option where you enter your Telegram cellphone...
Read more >auth.sendCode - Telegram APIs
API ID invalid. 400, API_ID_PUBLISHED_FLOOD, This API id was published somewhere, you can't use it now. 500, AUTH_RESTART, Restart the authorization ...
Read more >pyrogram.types.InlineKeyboardButton Example - Program Talk
Here are the examples of the python api pyrogram.types.InlineKeyboardButton taken from open source projects. By voting up you can indicate which examples are ......
Read more >Error Handling — Pyrogram Documentation
The father of all errors is named RPCError and is able to catch all Telegram API related errors. This error is raised every...
Read more >PhoneCodeExpired The confirmation code has expired ...
ApiIdInvalid : app.disconnect() return 'The key is invalid' except: return ... line 411, in _send RPCError.raise_it(result, type(data)) File "C:\Program ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you’re going to used Ids inside Api constructors don’t add the -100
You can possible just pass the id without constructor channel:-1001536877977
Thanks! I see that it is not the library issue so I will close it for now… 🙌