3

I opened a port on my PC using ngrok.

Was going to use the url given to enable events on my slack app.

I'm getting the following message on my terminal:

POST /slack/recieve

and I'm also getting this on the slack page.:

Your URL didn't respond with the value of the challenge parameter.

Below is the code I'm using (it's not my code. I'm doing the slackbot tutorial using botkit+node.js):

controller.hears(['^hello$'], 'direct_message,direct_mention', function(bot, message) {
  bot.reply(message, "Hi there, you're on workspace: " + message.team)
});
RobC
  • 22,977
  • 20
  • 73
  • 80
Dremukare
  • 43
  • 8
  • 1
    Things to check: 1. Do you have a webserver running on your local machine? Does it work to open a webpage through ngrok from your local machine? Does your app receive anything from Slack? (logfile) – Erik Kalkoken Apr 17 '18 at 12:07
  • this can not be the right code or that might be part of the problem. your app needs to reply with the challenge it receives from Slack. – Erik Kalkoken Apr 17 '18 at 19:10
  • 1
    thank you for your feedback. i'm not sure whether or not i have a local webserver running. i will look into all of this. It's been a great learning opportunity – Dremukare Apr 18 '18 at 12:09
  • If you have local webserver running and its setup correctly, just enter `localhost` in your browser. or the URL you got from ngrok. You should get the start page. – Erik Kalkoken Apr 18 '18 at 17:36
  • getting "Cannot GET /" when i enter localhost in my browser – Dremukare Apr 25 '18 at 10:46
  • Looks like you don't have a webserver running then. You can run a simple web server with node.js, see here: https://stackoverflow.com/a/23122981/4379151 – Erik Kalkoken Apr 25 '18 at 11:44
  • Or you can install a full WAMP stack: https://sourceforge.net/projects/wampserver/ – Erik Kalkoken Apr 25 '18 at 11:44

0 Answers0