Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram bots API responds 403 Forbidden

Tags:

http

post

request

I'm fairly new to programming and I want to make a simple bot for telegram. After creating new bot using bot father and getting token, I made a simple HTTP post request to the below address:

https://api.telegram.org/bot{token}/METHOD_NAME

But for any method, I faced with a 403 error page. What's wrong?

like image 766
Ameer Mousavi Avatar asked Jun 25 '15 22:06

Ameer Mousavi


2 Answers

https://api.telegram.org/bot{yourtoken}/get_me(or any method name) just like me you are forgetting "bot" after https://api.telegram.org/

like image 180
brutalsam90 Avatar answered Oct 10 '22 03:10

brutalsam90


You should not replace bot string with your Bot's username, Just append given token at the end of /bot (e.g .../bot123456:ABC-D...) and your URL is ready.

like image 28
MrRolling Avatar answered Oct 10 '22 02:10

MrRolling