1

I working on python telegram bot that allow login telegram client using registered user and then do some actions using user credentials ... ... But I got the following error:

ERROR: The confirmation code has expired (caused by SignInRequest)

I use the following libraries aiogram and telethon. The error above is provided by telethon

Looks like telethon cannot use the same api_id and api_hash for different users ...

But if it is a case then I make bot useless, because user should now about api_id and api_hash and I cannot login telegram client by user credentials ... It is very strange ...

Looks like it happens not for all accounts ... some accounts login successful ...

Have anybody faced with the same error ?

Denis Kotov
  • 857
  • 2
  • 10
  • 29

1 Answers1

0

This error is usually encountered when you send the auth code to someone's dm in Telegram. This is done for security, so that people don't send their auth codes to scammers. If this is intentional, you can modify the auth code before sending it. E.g. use an underscore: "123_45"

MMM
  • 353
  • 4
  • 11