Skip to content

Instantly share code, notes, and snippets.

@slv922
Created March 13, 2017 06:54
Show Gist options
  • Save slv922/9f71c103e38485a3d99c19e5add43efc to your computer and use it in GitHub Desktop.
Save slv922/9f71c103e38485a3d99c19e5add43efc to your computer and use it in GitHub Desktop.
Send Message to Slack Channel with curl by perl
#!/usr/bin/perl
$token = "your token";
$text = "test";
$cmd = "curl -F channel=#test -F token=\'$token\' -F text=\'$text\' -k https://slack.com/api/chat.postMessage";
system($cmd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment