\ Telegram bots api responds to error 403 (forbidden)

I am new to programming and I want to make a simple bot for telegram. Having created a new bot using my father’s bot and receiving a token, I made a simple HTTP request to the following address:

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

But for any method, I came across a 403 error page. What is wrong?

+6
source share
3 answers

https://api.telegram.org/bot {yourtoken} / get_me (or any method name) like me, you forget the "bot" after https://api.telegram.org/

+6
source

You should not replace the bot string with your Bot username, just add this token at the end of /bot (for example, .../bot123456:ABC-D... ) and your URL is ready.

0
source

replace the key token with your string, which is provided by the bot's father. The telegram user who will interact with the bot must send / run a command to the bot. I think this is a kind of registration or allowing the bot to work with the user.

0
source

Source: https://habr.com/ru/post/989773/


All Articles