An error 404 but all data are matching

please help me out these are my codes with output out


Try using the POST method instead of the GET method. Also use https protocol for Telegram url and not http.
Please remove the screenshots with your private API keys.
Also, as a precaution, reset your API keys if possible.

1 Like

Can you please elaborate the method

Hi @push1970

You are sending the request to telegram using GET method. You need to send data your data using POST method.

Your current code in send_telegram_message function -

response = requests.request(

Correct code in send_telegram_message function -

response = requests.request(

To know more about GET and POST refer this link

Do let me know in case you need any other information.

no still same

hey just restart you device and try again because in my case also i tried 5 time then also there was error 404 was there but after restart several time it works ,and see if you have some code error :slight_smile:

no bro still i am getting same error i dont knew why someone please help me i am stuck for 2 days

i have posted all my details which can help me out so,please help me

@push1970 You have entered an incorrect URL for telegram. The URL entered by you is,
"" + conf.telegram_bot_id + "/send message"
whereas the correct URL is,
"" + conf.telegram_bot_id + "/sendMessage"

Also, the request is supposed to be a POST method. Please make the change in the method and the URL and it should work.
Add the print statement after you have defined the URL to make sure that the URL is correct.


yes its working thank you sir sol

1 Like