7

I have slackbox running locally, have created a Spotify dev application and have successfully authenticated slackbox. It says I am logged in at http://localhost:5000/. All of my variables have been set, including the slack token, in an .env file via dotenv.

All seems well there.

On the slack side, I have created a slash command mapped to /spotify that POSTs to http://localhost:5000/store. The slash command shows up in my command description list when typing.

When I attempt to use it though, I get an access denied message in chat, I'm assuming due to cross-domain issues:

ERROR: The requested URL could not be retrieved

Access Denied.

According to their docs - https://github.com/benchmarkstudios/slackbox - running this locally should work. I also run a Hubot bot locally and it integrates fine with the same slack room.

Any help is appreciated!

tomster2300
  • 107
  • 2
  • 8

1 Answers1

6

https://sprint.ly/blog/5-steps-to-a-slack-integration/

Slack’s outgoing slash command requests need to be sent to a public facing url, which is a problem if we want to receive these messages to our local development server.

How do we solve this?

One way is with the use of a secure tunnel which acts as a public HTTPS URL for our local development server. Problem solved!

Who provides this service?

ForwardHQ provide the best user experience, including a browser extension for setting up a local tunnel in one click. They have a free 7 day trial.

My preferred option is ngrok. It’s free for one concurrent tunnel client, with no time restriction. Woop! Its a little harder to use but it does the job.

Community
  • 1
  • 1
rosegrink
  • 333
  • 4
  • 9