# 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" | |