Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error_code":401 when give chat_id

Tags:

telegram-bot

I am trying to get my chat_id for my telegram channel. Bot I get this line error:

 {"ok":false,"error_code":401,"description":"[Error]: Unauthorized"}

My Channel Name is: MyName

My link is: https://telegram.me/MyNameIsChannel.

like image 605
alberta Avatar asked Sep 16 '25 21:09

alberta


1 Answers

The first and the main reason of the problem is that I'm using my telegram on a phone only and have to type the token manually on a Laptop keyboard. That was the case. No firewalls, no extra installation (of some software) was a reason but a SIMPLE TYPO. Better just COPY&PASTE the token whatever way you can.

Don't forget about the "bot" suffix and upper/lowercase letters also matters.

I've spent so many time for googling/troubleshooting and in fact it was a simple typo.

like image 154
Гдето Якутский Avatar answered Sep 20 '25 17:09

Гдето Якутский