A serverless service providing badge and invitation gateway for public Slack channels. You'll be able to bring this up on AWS in minutes.
Step 1: Generate AWS access and secret key by creating a user in AWS IAM with AdministratorAccess
permission.
Step 2: Generate a Slack token using this page.
Step 3: Set following ENV variables:
AWS_ACCESS_KEY_ID
: Your AWS access key generated in Step 1AWS_SECRET_ACCESS_KEY
: Your AWS secret access key generated in Step 1SLACK_API_TOKEN
: The slack API token generated in Step 2SLACK_SUBDOMAIN
: Your slack subdomain for your workspacehttps://<your-subdomain>.slack.com
Step 4: Run following commands:
yarn install
yarn build
serverless deploy
You should be able to pass the ENV variables like this:
AWS_ACCESS_KEY_ID="abc" AWS_SECRET_ACCESS_KEY="abc" SLACK_API_TOKEN="abc" SLACK_SUBDOMAIN="your-subdomain" serverless deploy
It should give you a link to the service!
Step 1: Set following ENV variables:
export SLACK_API_TOKEN='abc'
export SLACK_SUBDOMAIN='your-subdomain'
Step 2: Install, build and start:
yarn install
yarn build
yarn start
GET /badge.svg
Displays an SVG badge with the number of online users and total users in Slack.
You can embed this badge in your Github repo using following snippet:
[![Slack](https://slackinvite.dev.tophat.com/badge.svg)](https://opensource.tophat.com/#join-slack)
POST /invite
By posting email
to this endpoint, a Slack invitation will be sent from the user who generated the Slack API token.
This enpoint will return 400
if the email is not valid or user is already invited with following JSON as response:
{"success": false, "message": "Error Message" }
GET /stats
Returns number of active and total members on Slack in following format:
{"success": true, "stats": {"total": 39, "active": 25}}
Thanks goes to these wonderful people (emoji key):
Siavash Bidgoly 💻 📖 🚇 |
Jake Bolam 📖 🚇 |
---|
Thanks to Carol Skelly for donating the github organization!