Get your Slack Events API bot off the couch

Brad Harris
Beep Boop HQ
2 min readAug 23, 2016

--

The new Slack Events API is fantastic, allowing you to ditch sockets and create bots over HTTP. However, these bots are lazy, never appearing “active” in Slack. Well it’s time to get those bots off the couch!

The only way for your bot to appear active in Slack currently is to connect over the Realtime Messaging API (RTM). You see, nobody puts the Events API in a corner.

Nobody puts the Events API in a corner

So 😱 we decided to “fix it” for Slapp based apps on Beep Boop.

Ok, we didn’t exactly “fix it”, it’s a bit of a stop gap for now until there’s an official solution from Slack. If you’re running on Beep Boop, you just need to drop in a module called beepboop-slapp-presence-polyfill like so:

You’ll also need to enable “Multi-Team Socket Mode” on your Beep Boop Project.

Behind the scenes this creates an RTM socket connection for each team that is essentially ignored, but provides us with an “active” status for our bot.

Our mission at Beep Boop is to provide the best tools for you to create great Slack Apps. Beep Boop is a product by Robots & Pencils. Need help creating a great Slack integration? Let us know how we can be your hero. 🙋

--

--