Skip to content

Slack

Terminal window
# Send to channel
curl -H "Authorization: Bearer $SLACK_TOKEN" -d "text=Hi I am a bot that can post messages to any public channel." -d "channel=channelname" https://slack.com/api/chat.postMessage
# Send DM (channel=userID)
curl -H "Authorization: Bearer $SLACK_TOKEN" -d "text=Hi I am a bot that can post messages to any public channel." -d "channel=U03XXXTWCF5X" https://slack.com/api/chat.postMessage