Search code examples
telegramtelegram-bot

401 Unauthorized error after a year of successful using of Telegram API


Today when I as usually run my client to read income messages of my Telegram Bot I get the error

{"ok":false,"error_code":401,"description":"Unauthorized"}

I had been successfully used Telegram API every day during a year and never seen this error. I also didn't change any settings

What may happened?

At the page https://core.telegram.org/api/errors I read it's possible to get more detailed error description like AUTH_KEY_UNREGISTERED, AUTH_KEY_INVALID, USER_DEACTIVATED and so on.

But how can I do that?

Is it possible just to add something in the address bar to the request like https://api.telegram.org/bot<MY_TOKEN>/... ?


Solution

  • It may be helpful for someone.

    I was not using my main account of Telegram associated with my phone number more than a year. That's why Telegram deleted my main account and accordingly my Telegram bot.