skip to Main Content

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


  1. You need to add the word bot before the botToken.

    Token: xxx

    Resulting url to invoke: https://api.telegram.org/botXXX/getMe

    Login or Signup to reply.
  2. By the way, if you have n in the end of the token, it ll be the same 404 error

    Login or Signup to reply.
  3. I changed the folder permissions to 0755 and the problem was solved

    Login or Signup to reply.
  4. I have faced similar error using Telegram Bot SDK for laravel.

    Error:

    TelegramBotExceptionsTelegramResponseException Not Found
    

    Finally I realized that bot word have to be removed from token!!

    Change this:

    TELEGRAM_BOT_TOKEN=botxxx.....
    

    To this:

    TELEGRAM_BOT_TOKEN=xxx.....
    
    Login or Signup to reply.
  5. If you are experiencing this error in your IDE:

    /Users/UserName/Project/node_modules/telegraf/lib/core/network/client.js:291
                throw new error_1.default(data, { method, payload });
                      ^
    TelegramError: 404: Not Found
        at Telegram.callApi (/Users/UserName/Project/node_modules/telegraf/lib/core/network/client.js:291:19)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async Telegraf.launch (/Users/UserName/Project/node_modules/telegraf/lib/telegraf.js:182:78) {
      response: { ok: false, error_code: 404, description: 'Not Found' },
      on: { method: 'getMe', payload: {} }
    }
    

    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.

    Login or Signup to reply.
  6. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search