Go to Slack

Reference: App actions payloads

Received when a user uses any App Action.

Read our guide to handling payloads from user interactions to learn how your app should process and respond to these payloads.


Fields

This is a non-exhaustive list of fields that can be encountered in this type of interaction payload:

Field Description
type Helps identify which type of interactive component sent the payload. This will be message_action.
callback_id An ID that you defined when creating the action.
trigger_id A temporary ID generated for the interaction in your app. This value can be used to open modals.
response_url A temporary webhook that can be used to send messages in response to interactions.
user The user who interacted to trigger this request.
message The message that the user initiated the app action from. This will include the full structure of the message.
actions Contains data from the specific interactive component that was used. App surfaces can contain blocks with multiple interactive components, and each of those components can have multiple values selected by users. Combine the fields within actions (shown below) to help provide the full context of the interaction.
actions.block_id Identifies the block within a surface that contained the interactive component that was used. See the reference guide for the block you're using for more info on the block_id field.
actions.action_id Identifies the interactive component itself. Some blocks can contain multiple interactive components, so the block_id alone may not be specific enough to identify the source component. See the reference guide for the interactive element you're using for more info on the action_id field.
actions.value Set by your app when you composed the blocks, this is the value that was specified in the interactive component when an interaction happened. For example, a select menu will have multiple possible values depending on what the user picks from the menu, and value will identify the chosen option. See the reference guide for the interactive element you're using for more info on the value field.
token A deprecated verification token feature. You should validate the request payload, however, and the best way to do so is to use the signing secret provided to your app.

The remainder of the payload will identify the source of the interaction, giving your app info such as the channel the source interaction happened in, and the workspace (team) that channel is in.


Examples

A payload received when an App Action is used in a message's More actions menu:

{
  "token": "Nj2rfC2hU8mAfgaJLemZgO7H",
  "callback_id": "chirp_message",
  "type": "message_action",
  "trigger_id": "13345224609.8534564800.6f8ab1f53e13d0cd15f96106292d5536",
  "response_url": "https://hooks.slack.com/app-actions/T0MJR11A4/21974584944/yk1S9ndf35Q1flupVG5JbpM6",
  "team": {
    "id": "T0MJRM1A7",
    "domain": "pandamonium",
  },
  "channel": {
    "id": "D0LFFBKLZ",
    "name": "cats"
  },
  "user": {
    "id": "U0D15K92L",
    "name": "dr_maomao"
  },
  "message": {
    "type": "message",
    "user": "U0MJRG1AL",
    "ts": "1516229207.000133",
    "text": "World's smallest big cat! <https://youtube.com/watch?v=W86cTIoMv2U>"
  }
}