You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Build a complete Slack bot service with Slack button integration, in Ruby.
16
16
-[Storage](#storage)
17
17
-[MongoDB](#mongodb)
18
18
-[ActiveRecord](#activerecord)
19
-
-[OAuth Scopes](#oauth-scopes)
19
+
-[OAuth Version and Scopes](#oauth-version-and-scopes)
20
20
-[Slack App](#slack-app)
21
21
-[API](#api)
22
22
-[App](#app)
@@ -73,13 +73,14 @@ gem 'otr-activerecord'
73
73
gem 'cursor_pagination'
74
74
```
75
75
76
-
### OAuth Scopes
76
+
### OAuth Version and Scopes
77
77
78
-
Configure your app's [OAuth scopes](https://api.slack.com/legacy/oauth-scopes) as needed by your application.
78
+
Configure your app's [OAuth version](https://api.slack.com/authentication/oauth-v2) and [scopes](https://api.slack.com/legacy/oauth-scopes) as needed by your application.
@@ -91,11 +92,26 @@ Create a new Slack App [here](https://api.slack.com/applications/new).
91
92
92
93

93
94
94
-
Follow Slack's instructions, note the app client ID and secret, give the bot a default name, etc. The redirect URL should be the location of your app. For local testing purposes use a public tunneling service such as [ngrok](https://ngrok.com/) to expose local port 9292.
95
+
Follow Slack's instructions, note the app client ID and secret, give the bot a default name, etc.
95
96
96
97
Within your application, edit your `.env` file and add `SLACK_CLIENT_ID=...` and `SLACK_CLIENT_SECRET=...` in it.
97
98
98
-
Run `bundle install` and `foreman start` to boot the app. Navigate to [localhost:9292](http://localhost:9292). You should see an "Add to Slack" button. Use it to install the app into your own Slack team.
99
+
Run `bundle install` and `foreman start` to boot the app.
100
+
101
+
```
102
+
$ foreman start
103
+
07:44:47 web.1 | started with pid 59258
104
+
07:44:50 web.1 | * Listening on tcp://0.0.0.0:5000
105
+
```
106
+
107
+
Set the redirect URL in "OAuth & Permissions" be the location of your app. Since you cannot receive notifications on localhost from Slack use a public tunneling service such as [ngrok](https://ngrok.com/) to expose local port 9292 for testing.
Navigate to either [localhost:9292](http://localhost:9292) or the ngrok URL above. You should see an "Add to Slack" button. Use it to install the app into your own Slack team.
99
115
100
116
### API
101
117
@@ -174,7 +190,7 @@ The [Add to Slack button](https://api.slack.com/docs/slack-button) also allows f
0 commit comments