Getting error in ubuntu server error 404

I am getting error 404 in my ubuntu server when I run the code . I have check all the api of bolt and telegram it is correct and also check the status of bolt on another program then it is online but on main code it show offline and telegram message is also not sent .
please help me out this issue .Struct from evening in this error.

Looks like the url path is wrong. Make sure it is correct. Also remove the space between the end of the api key and closing quote "

1 Like

Your telegram chat id should start with @
In your case that should be @smart_irrigation_bolt

@amit7389k3,

As pointed out by the @Adith625, your URL path is incorrect.

You have added

URL = "https://api.telegram.org/" + telegram_bot_id + " /sendMessage"

Remove the extra space in " /sendMessage"

The correct line would be -

URL = "https://api.telegram.org/" + telegram_bot_id + "/sendMessage"

Then in your send_telegram_message function, you have used the URL variable then again added the /sendMessage route that is incorrect.

You can just use the below line.

url = URL + "?text=" + message + "&chat_id=" + telegram_chat_id

Do let me know in case you need further assistance.

Thanks for the help, It was helpful.