Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 2.65 KB

README.md

File metadata and controls

41 lines (35 loc) · 2.65 KB

Slack App Setup

To get your app up and running, you'll need to follow two sets of instructions: one before you deploy your Hangar app and one after it's up and running.

Initial Setup

Before you deploy your Hangar, follow these steps to generate secrets needed for deployment:

  • Create an app on the Slack API Site
  • Using the sidebar, navigate to "OAuth & Permissions" and enable them
    • Under 'Scopes' --> 'Bot Token Scopes' click Add an OAuth Scope and add the following scope:
      • im:history
      • im:write
      • mpim:write
      • users:read
      • chat:write
      • app_mentions:read
      • chat:write.public
  • Using the sidebar, navigate to the "App Home" and enable your bot
    • Scroll to "How Your App Displays" and click "Edit" next to "App Display Name" (we reccommend using your company name as the app name, e.g., American Airlines/@americanairlines for the display name and username respectively)
    • Scroll to "Show Tabs", and enable "Home Tab"
    • We also recommend enabling "Always Show My Bot as Online"
  • Using the sidebar, navigate to "Basic Information", scroll down, and copy the Signing Secret value and write it down somewhere safe
  • Using the sidebar, navigate to "Install App" and click "Reinstall App"
    • Once finished, copy the Bot User OAuth Access Token value and write it down somewhere safe

At this point, you can deploy and start your Hangar app by clicking on the Deploy to Heroku button in your repo. You will be prompted for the values above and once it's deployed, complete the section below to complete your configuration.

After Deploying Hangar

Once your Hangar app is up and running, use it's URL for the following steps:

  • Using the sidebar, navigate to "Interactivity & Shortcuts" and enable them
    • For the Request URL field, use your Hangar app's URL and then append /slack/events
  • Using the sidebar, navigate to "Event Subscriptions" and enable them
    • For the Request URL field, use your Hangar app's URL and then append /slack/events
    • Under "Subscribe to bot events" add the message.im, app_home_opened, and app_mention scopes
  • After clicking save, you should see a banner at te top of the page suggesting you reinstall the app; click Reinstall

Smoke Test

To confirm that Hangar is up and running, from Slack send a direct message to the Bot. You're up and running if you get a response!

Developing Locally

Copy or rename .env.sample to .env and update the values from the Initial Setup above

To develop locally, use ngrok to make your app accessible to Slack and then use that URL for for all the app steps above.