post / send_message.sh
zuehue's picture
Update send_message.sh
74919fe verified
raw
history blame contribute delete
448 Bytes
#!/bin/sh
# Define the message to be sent
MESSAGE="Hello, testing new domain"
# Define the URL for the Telegram Bot API
URL="https://api.basthofer.com/bot${BOT_TOKEN}/sendMessage"
# Send the message using curl with POST and JSON
RESPONSE=$(curl -i -X POST $URL -H "Content-Type: application/json" -d "{\"chat_id\":\"${CHAT_ID}\",\"text\":\"${MESSAGE}\"}")
# Print the response
echo "Response from server:"
echo "$RESPONSE"
echo "curl was sent"