Search code examples
httppostrequest

Telegram bots API responds 403 Forbidden


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?


Solution

  • https://api.telegram.org/bot{yourtoken}/get_me(or any method name)
    

    Just like me you are forgetting bot between https://api.telegram.org/ and your token.