Slack Slash Command – Passing custom POST paramater?

Is it possible to send POST data along with a Slash Command?

For example, when setting up a new Slash Command I can set the callback URL that will receive the POST data from Slack. In my case it’s

Read More
http://example.com/wp-admin/admin-post.php

I am writing this as a WordPress plugin, and in order to have the plugin parse the POST data I need to pass along an action variable in the POST data.

action=update_status

… so that the correct action is called:

add_action('admin_update_status', function() {
    // Parse POST
});

Is it possible to send a custom POST parameter with the slash command? Maybe something like:

/update action:update_status ProjectA is currently in Q/A

Related posts

Leave a Reply

1 comment

  1. I figured out I can also send the action parameter as a GET request like so:

    http://example.com/wp-admin/admin-post.php?action=update_status