Slack API - Event Subscriptions setup challenge

Hi there,

I’m setting up a Slack status indicator light using a Photon, and it seems the easiest way would be to set up a Device OS API Function to receive Slack webhooks, but I have one snag in this system.
In order to setup the Slack Event Subscriptions for your app, you need to basically prove you own the endpoint by responding to a test event with a ‘challenge’ parameter that it sends in the POST body. The ‘Particle.function’ endpoint doesn’t let us choose the return value, so I’m kind of stuck in setting this up. Besides adding an extra service to be the go-between of the two services, is there any way I can set this up?

Hi @boldbigflank ,

@toddparticle set up a Slack connected sensor and showed it just last week at Spectra 2021.
Maybe he knows how to do it?
Best

With a little digging it seems that his presentation focused on the other direction (particle → slack), probably because this is a little more complicated since it can’t be done with just the two services currently.

I guess the current method is to have the most simple of proxy servers to pass the requests along and respond to challenge POSTs.

1 Like