# Response from interactive button POST is ignored

**URL:** <https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757>\
**Category:** Troubleshooting\
**Created:** [July 25, 2019, 11:20am UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757 "2019-07-25T11:20:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex\_enyway](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@alex\_enyway](https://forum.mattermost.com/u/alex_enyway)\
**Post date:** [July 25, 2019, 11:20am UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/1 "2019-07-25T11:20:43Z")

</div>

'm building a slash command. The flow I imagine is:

1. User triggers slash command in client
2. My server handles request and returns interactive dropdown
3. User selects option from dropdown in client
4. My server handles the POST request from the selection and returns an interactive button
5. User presses the button

Something seems to go wrong between steps 4 and five. The server handles the selection and returns the desired response:

```auto
{ 
  "update": {"message": "Updated!"}, 
  "ephemeral_text": "You updated the post!", 
  "attachments": [{
    "text": "Ready?", "actions": [{
      "name": "Go!", 
      "integration": {
        "url": "https://somewhere.com?foo=bar",
        "context": {"action": "event_submitted"}
      }
    }]
  }]
}

```

…but nothing shows up in the client.

Is something wrong with that JSON? I have tried other things like only returning a text message.

I’ve set log level to DEBUG and don’t find anything suspicious there.

I wonder, if I have misunderstood the docs and the client will never even evaluate a response from a POST triggered by an interactive message. In that case I would have to make a new request back from my server to the Mattermost API in order to get to the next step in my workflow. Is that correct?

I have asked the same question on [StackOverflow](https://stackoverflow.com/questions/57096382/response-from-interactive-button-post-is-ignored-in-mattermost), but no answers yet.

---

<div class="post-metadata">

**Author:** ![xlorken](https://avatars.discourse-cdn.com/v4/letter/x/f04885/32.png) [@xlorken](https://forum.mattermost.com/u/xlorken)\
**Post date:** [July 25, 2019, 1:55pm UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/2 "2019-07-25T13:55:17Z")

</div>

What mattermost api endpoint do you use to send this message?

---

<div class="post-metadata">

**Author:** ![alex\_enyway](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@alex\_enyway](https://forum.mattermost.com/u/alex_enyway)\
**Post date:** [July 25, 2019, 2:10pm UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/3 "2019-07-25T14:10:30Z")

</div>

It’s not an API endpoint. The original trigger is a slash command. The part that fails is between 3 and 4 (see above).

---

<div class="post-metadata">

**Author:** ![xlorken](https://avatars.discourse-cdn.com/v4/letter/x/f04885/32.png) [@xlorken](https://forum.mattermost.com/u/xlorken)\
**Post date:** [July 25, 2019, 3:36pm UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/4 "2019-07-25T15:36:53Z")

</div>

> client will never even evaluate a response from a POST triggered by an interactive message

Pardon, I misread this.

From what I got, Mattermost controls do requests and doesn’t handle anything these requests return.  
Right now we use custom integration service which transforms info it gets from buttons into the valid mattermost api call.

---

<div class="post-metadata">

**Author:** ![alex\_enyway](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@alex\_enyway](https://forum.mattermost.com/u/alex_enyway)\
**Post date:** [July 26, 2019, 7:00am UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/5 "2019-07-26T07:00:33Z")

</div>

Thanks a lot for confirming!

I think the docs [here](https://docs.mattermost.com/developer/interactive-messages.html) could really do a better job of explaining this.

> The integration can respond with an update to the original post, or with an ephemeral message

It would be helpful to mention that this “response” would be a separate API call, not an http response.

---

<div class="post-metadata">

**Author:** ![xlorken](https://avatars.discourse-cdn.com/v4/letter/x/f04885/32.png) [@xlorken](https://forum.mattermost.com/u/xlorken)\
**Post date:** [July 26, 2019, 9:13am UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/6 "2019-07-26T09:13:31Z")

</div>

Yep, I completely agree, documentation is really vague about it.

---

<div class="post-metadata">

**Author:** ![aaronrothschild](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/aaronrothschild/32/2946_2.png) [@aaronrothschild](https://forum.mattermost.com/u/aaronrothschild)\
**Post date:** [July 29, 2019, 4:33pm UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/7 "2019-07-29T16:33:01Z")

</div>

Hello @alex_enyway and @xlorken - I’m updating the docs was wondering if you had any comments we should add to this page/link: [https://github.com/mattermost/docs/pull/2874](https://github.com/mattermost/docs/pull/2874)

I’ve replaced `The integration can respond with an update to the original post, or with an ephemeral message` with `The integration can then perform a separate API call with an update to the original post, or with an ephemeral message:`

Happy to address any other issues or add tips that will make it easier for others.

---

<div class="post-metadata">

**Author:** ![alex\_enyway](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@alex\_enyway](https://forum.mattermost.com/u/alex_enyway)\
**Post date:** [July 30, 2019, 9:47am UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/8 "2019-07-30T09:47:17Z")

</div>

Hey @aaronrothschild, Yeah that sounds like a very good idea. Thanks for your work there!

Maybe you could mention in a more prominent place that the Mattermost server will never evaluate response bodies from requests coming from Mattermost controls. I didn’t find that anywhere in the docs and there is no warning in the logs. Your suggested edit is a step in the right direction, but it might still be overlooked. And for me it was a pretty frustrating experience to find that out by trial and error - and @xlorken’s help of course.

How about a listing of the different kinds of integrations and whether the server will evaluate response bodies or not?  
Slash Commands - Yes  
Incoming Webhooks - Yes  
POSTs from interactive controls - No

---

<div class="post-metadata">

**Author:** ![aaronrothschild](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/aaronrothschild/32/2946_2.png) [@aaronrothschild](https://forum.mattermost.com/u/aaronrothschild)\
**Post date:** [August 1, 2019, 3:58am UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/9 "2019-08-01T03:58:52Z")

</div>

I’ve created a PR for the doc change and have added a table with the different integration types. It would be great if you could add some more context, I’ve also asked one of our developers to review this. Thanks for your help, and sorry about the frustrations you encountered!

> <https://github.com/mattermost/docs/pull/2874>

---

<div class="post-metadata">

**Author:** ![alex\_enyway](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@alex\_enyway](https://forum.mattermost.com/u/alex_enyway)\
**Post date:** [August 1, 2019, 7:27am UTC](https://forum.mattermost.com/t/response-from-interactive-button-post-is-ignored/7757/10 "2019-08-01T07:27:49Z")

</div>

Hey @aaronrothschild, that looks pretty good to me. Although I don’t know what I was thinking when mentioning incoming webhooks. That’s a request, not a response and I think everyone knows that the server evaluates the request body as otherwise they’d be useless. Outgoing webhooks on the other hand should be mentioned. I haven’t tried them though and would have no idea, whether their responses would be evaluated.
