I have the following script, simple to send messages to Telegram from linux:
#!/bin/bash
USERID="XXXXXXXXXX"
KEY="ZZZZZZZZZ:YYYYYYYYYYYYYYYYYYYYYYYYYY"
URL="https://api.telegram.org/bot$KEY/sendMessage"
MSG="Mensaje de Prueba"
curl -s --max-time 10 -d "chat_id=$USERID&disable_web_page_preview=1&text=$MSG" $URL
The program doesn't give me an error, but I don't get the messages from the servers, I'm starting in the world of scripts, I hope you understand.