Slackin-extended is a more customizable and extendable fork of the original slackin.
- A landing page you can point users to fill in their emails and receive an invite (
<iframe>badge to embed on any website that shows connected users in realtime with socket.io.
- A SVG badge that works well from static mediums (like GitHub README pages)
- Abuse prevention via Google reCAPTCHA, including Invisible reCAPTCHA.
- Color scheme customization on both the landing page and the badge.
Disclaimer: this project is not affiliated with Slack. The Slack logo and Slack API are copyright Slack Technologies, Inc.
git clone https://github.com/emedvedev/slackin-extended.gitnow secrets add slack-subdomain "myslack"now secrets add slack-api-token "xoxb-YOUR-SLACK-TOKEN"now slackin-extended
The Docker container is available on Docker Hub: emedvedev/slackin-extended.
To host Slackin-extended yourself, install it via
npm and launch it on your server:
npm install -g slackin-extendedslackin "workspace-id" "your-slack-token"
<!-- append "?large" to the URL for the large version -->
By default, the badge background color will be set to your accent color, but you can customize both background and text colors through the query string:
Every CLI parameter, including mandatory arguments (workspace ID and token), can alternatively be configured through environment variables.
||Required||Slack workspace ID (
||Port to listen on|
||Hostname to listen on|
||One or more comma-separated channel names to allow single-channel guests|
||Restrict sign-up to a list of emails (comma-separated; wildcards are supported)|
||How frequently (ms) to poll Slack|
||Path to serve slackin under|
||Do not print out warnings or errors|
||Enable CORS for all routes|
||Google Analytics ID|
||Use invisible reCAPTCHA|
||Color scheme to use,
||Accent color to use instead of a theme default|
||Full URL to a CoC that needs to be agreed to|
||Full URL to a custom CSS file to use on the main page|
||Delay (ms) between Slack API requests (may be required for large workspaces that hit the rate limit)|
||Trust proxy headers (only use if Slackin is served behind a reverse proxy)|
||If a domain name is specified in this parameter and
||Let's Encrypt challenge response|
Alternatively, you can specify the configuration parameters in a dotenv file: create a
.env file in the root directory of your project and add environment-specific variables on new lines in the form of NAME=VALUE. For example:
SLACK_SUBDOMAIN=mysubdomain SLACK_API_TOKEN=SLACK-API-TOKEN SLACKIN_THEME=dark
Tips and tricks
Please use reCAPTCHA for your Slack to avoid request flooding by spambots. Here is where to get your secret and sitekey. Make sure you choose a v3 API key.
Invisible reCAPTCHA is recommended for the realtime badge users, as the regular CAPTCHA challenge is broken inside the iframe that opens on badge click.
You can find or generate your API test token at api.slack.com/web. Important notes:
- you need a legacy token
- the user you use to generate the token must be an admin. You need to create a dedicated
@slackin-inviteruser (or similar), mark that user an admin, and use a test token from that dedicated admin user. Note that test tokens have actual permissions so you do not need to create an OAuth 2 app. Also check out the Slack docs on generating a test token.
Important: If you use Slackin in single-channel mode, you'll only be able to invite as many external accounts as paying members you have times 5. If you are not getting invite emails, this might be the reason. Workaround: sign up for a free org, and set up Slackin to point to it (all channels will be visible).
- Fork this repository to your own GitHub account and then clone it to your local device
- Uninstall slackin if it's already installed:
npm uninstall -g slackin-extended
- Link it to the global module directory:
- Run it locally with
npm run dev, after setting up the needed environment variables
Yay! Now can use the
slackin command everywhere.
Extending templates and themes
If changing accent colors and switching between light/dark themes isn't enough for you, all templates are stored inside
views/ and can be easily modified. Stylesheets are stored in
scss/, and both themes have a documented example of colors, variables and additional styles necessary to create your own.
If you end up creating another theme, you're more than welcome to submit a PR!
slackin will return a
Function that creates a
const slackin = ;
This will show response times from Slack and how many online users you have on the console. The returned
http.Server has an
app property that is the
express application that you can define or override routes on.
All the metadata for your organization can be fetched via a JSON HTTP request to