Skip to content

Instantly share code, notes, and snippets.

@icedraco
Created January 2, 2017 15:10
Show Gist options
  • Save icedraco/5e5161f05ff6af15c2f37a39cd11baf7 to your computer and use it in GitHub Desktop.
Save icedraco/5e5161f05ff6af15c2f37a39cd11baf7 to your computer and use it in GitHub Desktop.
Simple personal Telegram notifiation script
#!/bin/bash
# Based on the guide here:
# https://www.forsomedefinition.com/automation/creating-telegram-bot-notifications/
TOKEN="################################"
CHAT_ID="12345678"
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
TIME=10
TEXT="$1"
curl -s --max-time $TIME -d "chat_id=$CHAT_ID&text=$TEXT" $URL > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment