Reputation: 31
I am trying to build a slackbot which communicates with Cloud functions. Where there is an event, slack will send out a POST request and I will do some processing and use the incoming webhook to write to slack channel. However I saw a documentation, which says if you don't respond, they will try again. Hence it seems to be continuously writing because I did not respond. There also seems to be no clear documentation on how I should respond. Is there a clearer documentation? Please advice. Thank you.
https://api.slack.com/events-api
Upvotes: 0
Views: 907
Reputation: 1560
It's very clearly described what you need to respond with:
Your app should respond to the event request with an HTTP 2xx within three seconds
HTTP 2XX is an indication of an HTTP status code, ranging from 200 to 299 (not all of them exist per the standard). Depending on which framework you are using, you can probably set an HTTP status code in the response of a web request. Body of your response doesn't seem to matter, as long as it is an HTTP 2XX status code.
Upvotes: 2