200 status response to Slack interactive message not working

Viewed 1152

I am integrating my app with Slack, in particular interactive messages. I have enabled interactive messages and am using ngrok to route the action URL to my local development machine.

The following appears in a Slack channel:

screenshot from Slack

Clicking yes delivers a payload to my dev machine (truncated example):

{"payload"=>"{\"actions\":[{\"name\":\"approved\",\"type\":\"button\",\"value\":\"yes\"}]

Slack requires acknowledgment of the request within 3000ms to avoid timeout. I have been struggling and have now commented out all controller code expect head :ok.

def incoming
  head :ok
end

This appears in my logs as processed by the relevant route. ngrok shows a sub-1000ms response time but I still get the following in Slack.slack screenshot

I'm at a loss as to why the response is not being accepted by Slack. I've tried head :ok, head :no_content, render status: 200.

0 Answers
Related