From 00d1ba0228e3305a4bebe5891fe87a2c7f3dd3e3 Mon Sep 17 00:00:00 2001 From: Jonathan Church Date: Mon, 31 Oct 2016 16:18:49 -0400 Subject: [PATCH] Update slackbutton_bot.js example Adds forgotten line in example so it works as expected botkit needs redirectUri in config for slackbutton oauth Pass it into the example bot, check for redirectUri when run closes #459 --- examples/slackbutton_bot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/slackbutton_bot.js b/examples/slackbutton_bot.js index cb4b9f956..fa610baa7 100755 --- a/examples/slackbutton_bot.js +++ b/examples/slackbutton_bot.js @@ -27,8 +27,8 @@ This is a sample Slack Button application that adds a bot to one or many slack t /* Uses the slack button feature to offer a real time bot to multiple teams */ var Botkit = require('../lib/Botkit.js'); -if (!process.env.clientId || !process.env.clientSecret || !process.env.port) { - console.log('Error: Specify clientId clientSecret and port in environment'); +if (!process.env.clientId || !process.env.clientSecret || !process.env.port || !process.env.redirectUri) { + console.log('Error: Specify clientId clientSecret redirectUri and port in environment'); process.exit(1); } @@ -39,6 +39,7 @@ var controller = Botkit.slackbot({ { clientId: process.env.clientId, clientSecret: process.env.clientSecret, + redirectUri: process.env.redirectUri, scopes: ['bot'], } );