Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 2.06 KB

Section-5.md

File metadata and controls

37 lines (22 loc) · 2.06 KB

Section 5: Make it Go

Now we're ready to start our project locally! 🙌

With your virtual environment turned on and your secrets exported to the environment, go ahead and start your app:

python app.py

start_appy

Since Slack will need to talk to your app through teh interwebs, let's expose our app to the world wide web through an Ngrok tunnel. In a terminal window, open up an ngrok tunnel for the port your Flask app will be served on locally. (The default port for Flask is 5000)

ngrok http 5000

start_ngrok_https

Your terminal output should show both an http and https url ending in ngrok.io. Copy the https url and navigate in your browser to the Events Subscriptions tab in your app's settings page. In the Request URL form, paste the ngrok url and add /listening to the end.

request_url

Flip the Enable Events switch to on and you should receive an alert letting you know Slack is about to turn on the Events tap.

enable_events_alert

After you've enabled events, you'll need to add a redirect URL in your app's OAuth & Permissions settings page. This is where the /thanks endpoint we've set up earlier in our Flask app comes in. Just append /thanks to the end of the ngrok https url and paste it into the Redirect URL(s) form on the OAuth Settings section and hit save.

redirect_url_thanks

Now your app is ready to be installed on a Slack team! 🎉


Next More Info: README
Previous Section 4: App Credentials