Search code examples
slack-apislack

4xx_client_error interactive message fail


We have message buttons displaying beautifully, as per this: enter image description here

however, using fiddler, we capture this outgoing post

   POST https://phoenixbussolutions.slack.com/api/chat.attachmentAction?_x_id=e8e90912-1472153470.154 HTTP/1.1
Host: phoenixbussolutions.slack.com
Connection: keep-alive
Content-Length: 781
Origin: https://phoenixbussolutions.slack.com
....

which returns this JSON payload enter image description here

Can't find any information on the error... so we are very unique, or special... or perhaps even both? :)

Any help would be appreciated - our interactive button link has been set, and we are anticipating that this outgoing message, will result in an incoming message to the URL specified in the Interactive Button dialog of our Slack App.


Solution

  • Found my answer here. It's been awhile since I ASP.NET, and back then, I never understood what application/x-www-form-urlencoded means. We actually had a couple of problems that were masking the error message from our side, and we only had Slack's 4xx tidbit to try and figure out what was going on. Using FormDataCollection (scroll down to see a code example) as a parameter worked like a charm, and then after extracting the JSON from a name value pair, we can finally de-serialize into a dot net class.

    Now we are researching how to send data back within the original request back to Slack - but that's another question!