Skip to content

Commit 572013f

Browse files
committed
Make use of the Slack signing secret in the sample bots
Slack currently complains that this is missing when initiating connections
1 parent c0e1251 commit 572013f

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ This section walks you through code snippets to set up your Slack bot. If you wa
5757

5858
In your app, add the following lines to create your Slack controller using Botkit:
5959
```js
60-
const slackController = Botkit.slackbot();
60+
const slackController = Botkit.slackbot({ clientSigningSecret: YOUR_SLACK_SIGNING_SECRET });
6161
```
6262

6363
Spawn a Slack bot using the controller:

examples/multi-bot/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ASSISTANT_IAM_APIKEY=apikey
1313

1414
#SLACK
1515
SLACK_TOKEN=your_slack_bot_token
16+
SLACK_SIGNING_SECRET=your_slack_signing_secret
1617

1718
#FACEBOOK
1819
#FB_ACCESS_TOKEN=your_fb_bot_alphanumeric_access_token

examples/multi-bot/bot-slack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
var Botkit = require('botkit');
1818

19-
var controller = Botkit.slackbot();
19+
var controller = Botkit.slackbot({ clientSigningSecret: process.env.SLACK_SIGNING_SECRET });
2020
var bot = controller.spawn({
2121
token: process.env.SLACK_TOKEN
2222
});

examples/simple-bot/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ WORKSPACE_ID=your_workspace_id
1010

1111
#SLACK
1212
SLACK_TOKEN=your_slack_bot_token
13+
SLACK_SIGNING_SECRET=your_slack_signing_secret
1314

1415
# if is apikey
1516
ASSISTANT_IAM_APIKEY=apikey

examples/simple-bot/simple-bot-slack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var middleware = require('botkit-middleware-watson')({
2727
});
2828

2929
// Configure your bot.
30-
var slackController = Botkit.slackbot();
30+
var slackController = Botkit.slackbot({ clientSigningSecret: process.env.SLACK_SIGNING_SECRET });
3131
var slackBot = slackController.spawn({
3232
token: process.env.SLACK_TOKEN
3333
});

0 commit comments

Comments
 (0)