Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can also send messages over the HTTP based API. That can be used to let external services post messages to your channels or to a specific person.

Here an example for a script:

Code Block
languagebash
#!/bin/bash
Receiver=$1
Message=$2
curl -X POST -F "receiver=$Receiver" -F "msg=$Message" -F "apikey=YourSecretKey" https://your-domain/modules/addons/slackforwhmcs/API.php --silent


Then you can send messages using this command:

Code Block
languagebash
./send_slack "

...

#channel@$(hostname)" "My CPU temperatur is too high. Can you please check me urgently?"