Create .env
file with the following settings.
SLACK_CLIENT_ID=...
SLACK_CLIENT_SECRET=...
SLACK_SIGNING_SECRET=...
SLACK_VERIFICATION_TOKEN=...
SLACK_TOKEN=xoxb-...
REDMINE_DOMAIN=https://demo.redmine.com
REDMINE_TOKEN=...
Get the values from your app's Basic Information settings.
Run bundle install
and foreman start
.
Register your app via OAuth workflow from localhost:5000.
Expose the local server port 5000
to receive Slack events using ngrok.
ngrok http 5000
Copy the URL, e.g. https://79f0f6335438.ngrok.io
, and use it as the prefix for your events, slash commands, and interactive message buttons.
Add RACK_ENV=production
in .env
file
See config/initializers/slack_ruby_bot_server.rb for the required OAuth scopes. If you get Slack::Web::Api::Errors::MissingScope: missing_scope
errors, you are missing a scope in your app configuration.
Install bot to workspace and copy Bot User OAuth Token
to .env
(SLACK_TOKEN
)
Set the Request Url in your app's Features under Event Subscriptions, e.g. https://79f0f6335438.ngrok.io/api/slack/event
. When you change this URL, Slack will POST
a verification challenge to /api/slack/event
, which should succeed.
Subscribe to link_shared
events.
Add Your Redmine domain in App unfurl domains