slackslack-apislack-dialog

Slack Bot OpenModal Error: missing_post_type


I newly started with Slack Bot programming and I got an issue.

I am using Zapier as a webhook, and I created a new message with a button.

Now I want to open a modal like documented here: https://api.slack.com/methods/dialog.open#arg_token

For that, I make a POST Request via Zapier Webhooks like this: enter image description here

Instead of that the modal opens, I get a response with an error message "error missing_post_type"

enter image description here

I hope some expert can help me with this issue.

Thank you for the support!


Solution

  • The solution can be found in the linked documentation.

    The method was called via a POST request and included a data payload, but the request did not include a Content-Type header.

    You only need to add the content-type header. Then the post request should work.

    Content-Type: application/json