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
{{ message }}
This repository was archived by the owner on May 27, 2025. It is now read-only.
Now all the Blueprints examples have updated using workspace token model from the previous user-centric model. So what are the diffs in this version?
4
+
5
+
## Creating the app
6
+
7
+
Instead of using the previous App creation page, the new app is creates one at [https://api.slack.com/apps?new_app_token=1](https://api.slack.com/apps?new_app_token=1).
8
+
9
+
## Scopes
10
+
11
+
Some scopes are no longer valid with the new workspace apps.
12
+
13
+
In previous version, the app required:
14
+
*`commands`
15
+
*`users:read`
16
+
*`users:read.email`
17
+
*`chat:write:bot`
18
+
19
+
In the new version:
20
+
*`commands`
21
+
*`users:read`
22
+
*`users:read.email`
23
+
*`chat:write`
24
+
25
+
You can learn more about scopes at [https://api.slack.com/scopes](https://api.slack.com/scopes)
26
+
27
+
## Installation
28
+
29
+
When you install the app, you will be ask to choose which channel(s) to install it. Once you install, on your Slack client, you see a message that tells you the app was adding to certain channel(s). Also the app name appears under "Apps". This is your `app_home`.
30
+
31
+
## OAuth
32
+
33
+
Your OAuth access token should begins with `-xoxa`, instead of `-xoxp`.
34
+
35
+
## Sigining secret
36
+
37
+
You used to verify if a request was coming from a reliable source (well, from us Slack!) by checking with the legacy *verificatin token*. Now you have more secure [sigining secret](https://api.slack.com/docs/verifying-requests-from-slack).
38
+
39
+
Basically, you need to compare the value of the `X-Slack-Signature`, the HMAC-SHA256 keyed hash of the raw request payload, with a hashed string containing your Slack signin secret code, combined with the version and `X-Slack-Request-Timestamp`.
*Updated August 2018: As we have introduced the workspace app (currently in beta), this tutorial and the code samples have been updated using the new token model! All the changes from the previous version of this example, read the [DIFF.md](diff.md)*
4
+
5
+
*Learn more about the workspace app at the [Slack API doc(https://api.slack.com/workspace-apps-preview).]*
6
+
3
7
## Creating a helpdesk ticket using a Slash Command and a Dialog
4
8
5
9
Use a slash command and a dialog to create a helpdesk ticket in a 3rd-party system. Once it has been created, send a message to the user with information about their ticket.
@@ -10,25 +14,15 @@ Use a slash command and a dialog to create a helpdesk ticket in a 3rd-party syst
10
14
11
15
#### Create a Slack app
12
16
13
-
1. Create an app at api.slack.com/apps
14
-
1. Navigate to the OAuth & Permissions page and add the following scopes:
17
+
1. Create a *workspace app* at [https://api.slack.com/apps?new_app_token=1](https://api.slack.com/apps?new_app_token=1)
18
+
2. Add a Slash command (See *Add a Slash Command* section below)
19
+
3. Enable Interactive components (See *Enable Interactive Components* below)
20
+
4. Navigate to the **OAuth & Permissions** page and add the following scopes:
15
21
*`commands`
16
22
*`users:read`
17
23
*`users:read.email`
18
-
*`chat:write:bot`
19
-
1. Click 'Save Changes' and install the app
20
-
21
-
#### Run locally or [](https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint)
22
-
1. Get the code
23
-
* Either clone this repo and run `npm install`
24
-
* Or visit https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint
25
-
1. Set the following environment variables to `.env` (see `.env.sample`):
26
-
*`SLACK_ACCESS_TOKEN`: Your app's `xoxp-` token (available on the Install App page)
27
-
*`PORT`: The port that you want to run the web server on
28
-
*`SLACK_VERIFICATION_TOKEN`: Your app's Verification Token (available on the Basic Information page)
29
-
1. If you're running the app locally:
30
-
1. Start the app (`npm start`)
31
-
1. In another window, start ngrok on the same port as your webserver (`ngrok http $PORT`)
24
+
*`chat:write`
25
+
5. Click 'Save Changes' and install the app (You should get an OAuth access token after the installation)
32
26
33
27
#### Add a Slash Command
34
28
1. Go back to the app settings and click on Slash Commands.
@@ -41,4 +35,13 @@ Use a slash command and a dialog to create a helpdesk ticket in a 3rd-party syst
41
35
42
36
#### Enable Interactive Components
43
37
1. Go back to the app settings and click on Interactive Components.
44
-
1. Set the Request URL to your ngrok or Glitch URL + /interactive-component
38
+
1. Set the Request URL to your server or Glitch URL + /interactive-component
39
+
40
+
#### Run the app locally or [](https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint)
41
+
1. Get the code
42
+
* Either clone this repo and run `npm install`
43
+
* Or visit https://glitch.com/edit/#!/remix/slack-slash-command-and-dialogs-blueprint
44
+
2. Set the following environment variables to `.env` (see `.env.sample`):
45
+
*`SLACK_ACCESS_TOKEN`: Your app's `xoxa-` token (available on the Install App page)
46
+
*`SLACK_SIGNING_SECRET`: Your app's Signing Secret (available on the **Basic Information** page)
47
+
3. If you're running the app locally, run the app (`npm start`)
0 commit comments