please help me out these are my codes with output
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.
Can you please elaborate the method
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( "GET", url, params=data )
Correct code in send_telegram_message function -
response = requests.request( "POST", url, params=data )
To know more about GET and POST refer this link https://www.w3schools.com/tags/ref_httpmethods.asp
Do let me know in case you need any other information.
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
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,
"https://api.telegram.org/" + conf.telegram_bot_id + "/send message"
whereas the correct URL is,
"https://api.telegram.org/" + 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