Search code examples
linuxubuntuslackslack-apislack-commands

Slack App Bot Can't Post Messages to Channel


Hello my Developer Gurus,

I am trying to make a bot that runs on a cron job from a Linux Cloud Bases Instance.

Linux miradashboard1 4.8.0-22-generic #24-Ubuntu SMP Sat Oct 8 09:15:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

As a result, I have made some scripts that run can run from my local machine. But I need a server to really run this script and post automatically to the channel via a cronjob. Here is the output when I try to test send the curl -x POST command to the channel.

rbarrett@miradashboard1:~/Git/SalesforceCLI/Integration/Slack$ ping https://hooks.slack.com/services/XXXXXX/XXXXXX/XXXXXX
ping: https://hooks.slack.com/services/XXXXX/XXXXX/XXXXX: Name or service not known
rbarrett@miradashboard1:~/Git/SalesforceCLI/Integration/Slack$ curl -X POST -H 'Content-type: application/json' --data '{"text":"Testing Handover Bot from Miradashboard Instance"}' https://hooks.slack.com/services/XXXXX/XXXXXXXXXX/XXXXXXXXXXXXXX

Solution

  • So I had already installed the app to another channel. I tried adding it to another channel, which apparently nullified the webhook. Looks like it is working just fine after I re-installed it to the channel.