I just created a bot of telegram to finish a task for the school regarding the integration of ifttt and telegram.
My problem is that trying a browser to use a method of Telegram api it returned to me the following string:
{“ok”: false, “error_code”: 404, “description”: “Not Found”}
I use this link to try to access to my bot:
https://api.telegram.org/botToken/getUpdates
The bot’s token is valid
You can help you solve the problem?
6
Answers
You need to add the word bot before the botToken.
Token: xxx
Resulting url to invoke: https://api.telegram.org/botXXX/getMe
By the way, if you have n in the end of the token, it ll be the same 404 error
I changed the folder permissions to 0755 and the problem was solved
I have faced similar error using Telegram Bot SDK for laravel.
Error:
Finally I realized that
bot
word have to be removed from token!!Change this:
To this:
If you are experiencing this error in your IDE:
Then you most likely have a problem with your .env file (specifically the bot token). Make sure your .env file parameters are written without trailing semicolons and without quotes (the latter is not required, but it may be important in your case).
I also recommend using the dotenv package if you are working in a node environment with .env files.
Just now, I encountered the same problem with you.After several minutes checking, I found that I add redundant symbols by mistake.
Telegram API Documention points out that we can make requests by
https://api.telegram.org/bot<token>/METHOD_NAME
.Actually I fill the ‘<>’ with token, which ‘<>’ should be deleted, and so that it caused the wrong return.I hope my experience can help you.