I found the following curl example to use a telegram bot to message a user. But that is written in PHP.
Is there an example of how to use the curl command in windows 10 command prompt to send a message to myself in telegram messenger?
I found the following curl example to use a telegram bot to message a user. But that is written in PHP.
Is there an example of how to use the curl command in windows 10 command prompt to send a message to myself in telegram messenger?
2
Answers
You haven’t mentioned the PHP code, but using CURL you can simply call:
Replace
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
with your own bot token and 1234 with your id. Don’t forget to start the bot before messaging yourself.Those who landed here due to above method is not working anymore -> you can use curl POST request like the following:
Where
For those who really likes .bat/.sh scripts there is an option to put the command into a .bat/.sh script, replace test_message with %~1/$1 placeholders respectively and execute the script with message argument like:
or