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?
Those who landed here due to above method is not working anymore -> you can use curl POST request like the following:
curl -s -o /dev/null -X POST -H "Content-Type: application/json" -d "{\"chat_id\": \"-100XXXXXXXXXX\", \"text\": \"test_message\", \"disable_notification\": false}" https://api.telegram.org/bot{API_TOKEN}/sendMessage
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:
. ./sendMessage.sh "Specific message having spaces"
or
. ./sendMessage.sh singleWordWithoutSpaces