Slack / RFID Application for opening doors with an two-factor system.
- Create an app at api.slack.com/apps
- Navigate to the Bot Users page and add a bot user
- Navigate to the Install App page and install the app
- Copy the
xoxb-
token after the installation process is complete
- Get the code
- Either clone this repo and run
npm install
- Either clone this repo and run
- Set the following environment variables to
.env
(see.env.sample
):SLACK_TEAM
: Your team, where the app is installed intoSLACK_TOKEN
: Your app'sxoxb-
token (available on the Install App page)SLACK_VERIFICATION_TOKEN
: Your app's Verification Token (available on the Basic Information page)PORT
: The port that you want to run the web server on
- Fill the configuration
config.yml
(seeconfig.yml.sample
) - If you're running the app locally:
- Start the app (
npm start
) - In another window, start ngrok on the same port as your webserver (
ngrok http $PORT
)
- Start the app (
- In the app settings, click on Interactive Messages
- Set the Request URL to your URL + /interactive-message
This code is loosely based on https://github.com/slackapi/template-terms-of-service