telegram-bot
Call the official Telegram Bot API with curl + jq. The bot token is
injected as $TELEGRAMBOT_BOT_TOKEN; an optional default target chat is
$TELEGRAMBOT_CHAT_ID (e.g. @your_channel or a numeric id). Base URL:
https://api.telegram.org/bot$TELEGRAMBOT_BOT_TOKEN/<METHOD>.
Every response is JSON {"ok":true,"result":...} on success, or
{"ok":false,"error_code":<n>,"description":"<msg>"} on failure — always check
.ok and show description verbatim. Common failures: 401 Unauthorized = bad/
revoked token (reconnect the connector), 400 Bad Request: chat not found = wrong
chat_id, 403 Forbidden: bot is not a member of the channel chat / ... need administrator rights = add the bot to the channel as an admin with post rights,
429 with parameters.retry_after = rate-limited, wait that many seconds.
chat_id is @channelusername (public) or the numeric id (private channels/
groups, often negative like -1001234567890). Resolve/verify it with getChat.