Hi everyone,
I pulled out a small script from another project of mine. This allows you to send messages directly from the terminal to a Telegram chat.
The only things you need to find out are:
- 1. the API token -> Ask the BotFather
- 2. the Chat ID -> curl 'https://api.telegram.org/bot<YourBOTToken>/getUpdates'
I'm going to do a tutorial on this.
Installation
curl -Os https://gist.githubusercontent.com/maxpatternman/5f5fe1d475f1626f4bac752f7c3cb5bc/raw/b9b470c1370cfa3b9de819f657e7ba19b5dbc967/send_to_telegram
chmod +x send_to_telegram
sudo mv send_to_telegram /usr/local/bin/send_to_telegram
sudo nano /usr/local/bin/send_to_telegram
Fill in you API_TOKEN and CHAT_ID
Usage
send_to_telegram 'some cool text'
Deinstallation
sudo rm /usr/local/bin/send_to_telegram
Have fun :)