Using Slack as a Public Chat

As we started organizing the 2015 JSConf China, we wanted to set up a public chat for anybody who wanted to help out. We had in the past used HipChat both internally at Wiredcraft and as support channel for some of ourproducts.

Our team switched over to Slack for internal chat a few months ago and we had been looking for an opportunity to start using it for public chat as well. Unfortunately, Slack allows you to create public organizations, but you still need to invite users individually.

Enters slackin, from Guillermo Rauch (the author of Socket.IO), which automates the process of inviting new users (among other things). It works wonderfully, so I thought I’d share how we got it set up (for free) on Heroku. Here we go:

The original slackin repo only supports paid account, we made submitted a PR but it hasn’t been merged yet. You go to https://github.com/Wiredcraft/slackin and click on the “Deploy to Heroku” button.

You’ll then be redirected to Heroku (create an account if needed, it’s free). When deploying the app, you’ll be asked for a few values:

slack_subdomain: enter the name of your team (in our case jsconfcn),

slack_api_token: use the API key you generated before at https://api.slack.com/web

slack_channel & slack_restrict can be left blank.

badge_height: set it to 20.

Once deployed, you’ll have the application link (in our case https://shenjs.herokuapp.com/) and a badge (https://shenjs.herokuapp.com/badge.svg). You can drop it in your README file on GitHub with a bit of Markdown magic, for example:

Note

Slack has now restricted the invite API to paid users only. For free accounts, the API will systematically return {error=paid_only, ok=false} and not send any invitation email. We contacted the Slack support but haven’t heard from them yet. More about this on GitHub: https://github.com/rauchg/slackin/issues/15

Share this post

Scan to open in WeChat

Stay tuned

Follow our newsletter or our WeChat account; every other week you'll receive news about what we're up to, our events and our insights on digital products, omnichannel, cross-border ecommerce or whatever the team fancies.