skip to Main Content

I have been running the telegram bot server locally for some few months now and everything works fine. Just wanted to add the newly introduced sendPaidMedia to mycode but kept getting the error {"ok":false,"error_code":404,"description":"Not Found: method not found"}.

Everything works fine when I use the official https://api.telegram.org/bot telegram server.

Could it be that the local server needs updating? If so how do I update it? I have searched for hours but has this seem to be a new feature, there is really no information about this error online. Every other method works fine on the local server just the sendPaidMedia

2

Answers


  1. Chosen as BEST ANSWER

    After hours of trial and error, I finally figured out that the local server indeed needed updating.

    1. By running telegram-bot-api --version, I discovered the server was running Bot API 7.3, but sendPaidMedia was introduced in Bot API 7.6.

    2. A simple sudo apt update and sudo apt upgrade won't upgrade the server, nor will re-running the commands from https://tdlib.github.io/telegram-bot-api/build.html. I sat through about 15 minutes of installation only to discover that the process just rebuilt the cached cloned git from Bot API 7.3.

    3. You need to stop the server, remove the entire telegram-bot-api folder (uninstall the server), and then follow the instructions from https://tdlib.github.io/telegram-bot-api/build.html.


  2. Make sure you’re running the latest version of the Bot API.

    Since you’re using a local Bot API server, you’ll need to manually update your server build to the latest version. The sendPaidMedia method was introduced in Bot API 7.6, which was released on July 1, 2024. To use this method, make sure that your local Bot API server is updated to version 7.6 or later one.

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