Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Slack Invite

Simple endpoint for inviting yourself to any Slack group. Built with Sinatra. Great for open & free groups.


How to set it up

Simplest (and free-est) way is to deploy this on Heroku's free dynos.

Step 1: Clone this repo

git clone
cd slack-invite

Step 2: Setup Heroku

Setup and configure Heroku Toolbelt if not already.

heroku apps:create
heroku config:set SLACK_CHANNEL=<your-slack-channel-name>
heroku config:set SLACK_TEAM_NAME=<your-slack-team-name>
heroku config:set SLACK_TEAM_AUTH_TOKEN=<your-slack-team-auth-token>

How to get your Slack Team Auth Token

  1. As Team Admin, go to the Slack Web API Documentation and click "Create Token" and it should generate a API Token. This is the value for SLACK_TEAM_AUTH_TOKEN.

  2. Then go to the channel.list API Tester. Select your Slack team for the token field, click on "Test Method".

You should see something like this in the response field :-

  "ok": true,
  "channels": [
          "id": "THIS-IS-YOUR-CHANNEL-ID",
          "name": "general",
          "is_channel": true,

Choose the channel ID you want the members to be invited into by default. That's the value for SLACK_CHANNEL.

  1. SLACK_TEAM_NAME is just name name of your Slack team, you can get this from your team URL (e.g.

Step 3: Deploy

Deploy the Heroku app

git push heroku master

Go to, you should see a JSON with invalid_email error. You can try to invite by simply doing

Step 4: Create the form

The endpoint only handles JSON requests, so you might want to use some AJAX to handle your form submissions.

<form id="slack_invite">
  Email: <input type="email" name="email_invite" id="email_invite" placeholder="">
  <button id="submit_button" type="submit">Submit</button>

<script src=""></script>
        url: '',
        dataType: 'jsonp',
        data: {
          email: $('#email_invite').val()
        success: function(data){
            alert("You're Invited !!!");
            alert("Something went wrong :(");

Put this code on your website and you're good to go :)

You can look at the RubyMY invite page for example


No description, website, or topics provided.



No releases published


You can’t perform that action at this time.