- [Bot erstellen](https://core.telegram.org/bots#6-botfather) - Dabei bekommt man dann den BOT TOKEN - Erstellen nun eine neue Gruppe. Zu dieser den BOT hinzufügen über den neuen Botnamen @.... - Im die Chat ID zu bekommen `curl https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates | jq .message.chat.id` ausführen. Oder direkt im Browser und dort sich die JSON Nachricht anschauen. - Mit curl einen POST request absenden. [Send messages](https://core.telegram.org/bots/api#sendmessage) Bsp.: curl -X POST -H 'Content-Type: application/json' \ -d '{"chat_id": "123456789", "text": "This is a test from curl", "disable_notification": true}' \ https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage Hier als bash Script: #!/bin/bash BOTTOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" CHAT_ID="xxxxxxx" URL="https://api.telegram.org/bot$BOTTOKEN/sendMessage" curl -s -X POST -H 'Content-Type: application/json' -d '{"chat_id": "'${CHAT_ID}'", "text": "Another test", "disable_notification": false}' ${URL} > /dev/null 2>&1 Das \> und -s entfernen damit die Ausgabe von curl sichtbar wird. Möchte man es komplett eigen betreiben, dann sollte man sich [Gotify](https://gotify.net/) anschauen. Jan 06 2022 © https://www.bananas-playground.net 2000 - 2025