#!/bin/bash
TELEGRAM_BOT_TOKEN="YOUR_TELEGRAM_BOT_TOKEN"
TELEGRAM_CHAT_ID="YOUR_TELEGRAM_CHAT_ID"
MESSAGE="Hello, from your Telegram bot!"
TELEGRAM_API_URL="https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage"
curl -s -X POST ${TELEGRAM_API_URL} -d chat_id=${TELEGRAM_CHAT_ID} -d text="${MESSAGE}"
#!/bin/bash
TELEGRAM_BOT_TOKEN="YOUR_TELEGRAM_BOT_TOKEN"
TELEGRAM_CHAT_ID="YOUR_TELEGRAM_CHAT_ID"
MESSAGE="*Bold* _italic_ [link](https://www.example.com)"
IMAGE_PATH="/path/to/image.jpg"
VIDEO_PATH="/path/to/video.mp4"
FILE_PATH="/path/to/file.txt"
TELEGRAM_API_URL="https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage"
curl -s -X POST ${TELEGRAM_API_URL} -d chat_id=${TELEGRAM_CHAT_ID} -d text="${MESSAGE}" -d parse_mode=Markdown
curl -s -X POST ${TELEGRAM_API_URL} -d chat_id=${TELEGRAM_CHAT_ID} -F photo=@${IMAGE_PATH}
curl -s -X POST ${TELEGRAM_API_URL} -d chat_id=${TELEGRAM_CHAT_ID} -F video=@${VIDEO_PATH}
curl -s -X POST ${TELEGRAM_API_URL} -d chat_id=${TELEGRAM_CHAT_ID} -F document=@${FILE_PATH}