Slackrtm

primitive library for c++ to access the slack real time messaging api
Alternatives To Slackrtm
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Pokemongo Bot3,719
2 years ago151mitPython
The Pokemon Go Bot, baking with community.
Diyhue1,446
17 hours ago69otherPython
Main diyHue software repo
Butler51
5 days ago27mitJavaScript
Butler brings superpowers to Qlik Sense Enterprise on Windows! Advanced reload failure alerts, task scheduler, key-value store, file system access and much more.
Led Bot25
5 years ago18mitPython
Slackrtm11
2 months agoC++
primitive library for c++ to access the slack real time messaging api
Flogo Components11
3 years agoGo
Slackube3
3 years agogpl-3.0Ruby
Slackube integration
Tetrad3
6 years agomitJava
Tetrad: cross-chat-platform integration
Alternatives To Slackrtm
Select To Compare


Alternative Project Comparisons
Readme

Don't use this - it's horribly out of date and slack API changes mean it's largely non-functional

SlackRtm

SlackRtm is a very minimal c++ library for the Slack Real Time Messaging protocol, with an example app (slackmqtt) that acts as a bridge between slack and an MQTT broker such as Mosquitto - this makes it particularly easy for Arduinos making use of the pubsubclient library to message a slack channel.

Features

  • At present, only allows for messages to be sent to/from slack channels - i.e. no support for private messages, private channels, etc.

Requirements

  • Linux; current only tested on Debian Stretch.
  • Required packages: g++ libjson-c-dev libcurl4-gnutls-dev libutfcpp-dev libboost-dev libmosquittopp-dev libmosquitto-dev mosquitto mosquitto-clients libwebsockets-dev cmake

slackmqtt

Building

  1. Install the required packages: "apt-get install g++ libjson-c-dev libcurl4-gnutls-dev libutfcpp-dev libboost-dev libmosquittopp-dev libmosquitto-dev mosquitto mosquitto-clients libwebsockets-dev cmake"
  2. After cloning, run "cmake ." in the root

Usage

  1. Get an API token from Slack, goto: Configure Intergrations DIY Integrations & Customizations -> Bots Pick a username -> add Intergration Note down the "API Token"

  2. Run SlackMqtt, and specifiy (at minimum) the API key:

./examples/mqtt/SlackMqtt -k "<token>"

By default, SlackMqtt expects to find an MQTT broker running on localhost, port 1883; this can be overridden by passing the "-p <port>" and/or "-h <host>" parameters.

Once running, messages in any of the Slack channels the bot is present in will be published to the MQTT topic "slack/rx/<channel>"; this can be seen by running something like "mosquitto_sub -t 'slack/rx/#'" in another terminal. The MQTT topic used can be changed by the "-r <topic>" parameter.

Messages published to the MQTT topic "slack/tx/<channel>" will be sent to the Slack channel <channel>, provided that the bot is already present in that channel (i.e. has been invited in). This MQTT topic can be changed by the "-t <topic>" parameter. E.g. to send a message to #general, run "mosquitto_pub -t 'slack/tx/general' -m 'hello, world'".

Glaring ommisions

  • No ability to send PMs
  • No systemd, upstart or init script included yet, so needs be ran directly from the console. It is able to redirect logging to syslog (parameter "-l SYSLOG"), so writing such a script probably isn't hard
  • Only tested on - and for the moment, probably only works on - Debian Stretch
  • Probably a lot more

slackrtm

TODO: Some/more documentation on the slackrtm library.

Popular Slack Projects
Popular Mqtt Projects
Popular Messaging Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Plus Plus
Slack
Mqtt