slackapi / slack-api-specs

Open API specifications for platform products by Slack
MIT License
222 stars 64 forks source link

External select documentation problem #28

Open frankyrus opened 5 years ago

frankyrus commented 5 years ago

Description

We are trying to implement interactivity select with the external datasource as described here - https://api.slack.com/reference/block-kit/block-elements#external_select

Our select inside actions:

{
    "blocks": [{
        "type": "actions",
        "elements": [{
            "type": "external_select",
            "action_id": "subprocess",
            "placeholder": {
                "type": "plain_text",
                "text": "Subprocess"
            },
            "min_query_length": 4
        }]
    }]
}

Request for external options:

{
    "type": "block_suggestion",
    "action_id": "subprocess",
    "block_id": "+7x/Z",
    "value": "4367",
    "message": {
        "bot_id": "BNQSQ2ZDK",
        "type": "message",
        "text": "This content can't be displayed.",
        "user": "UNQCZ5C4U",
        "ts": "1570463370.018100",
        "team": "T2V37EATG",
        "blocks": [{
            "type": "actions",
            "block_id": "+7x/Z",
            "elements": [{
                "type": "external_select",
                "action_id": "subprocess",
                "placeholder": {
                    "type": "plain_text",
                    "text": "Subproess",
                    "emoji": true
                },
                "min_query_length": 4
            }]
        }]
    }
}

Our response to POST with code 200 as application/json:

{
    "options": [{
        "text": {
            "type": "plain_text",
            "text": "Scoring"
        },
        "value": "Scoring"
    }, {
        "text": {
            "type": "plain_text",
            "text": "Delivery"
        },
        "value": "Delivery"
    }]
}

After this response we have the error: {ok: false, error: "invalid_response_json"} on Slack client. What is the correct response format for this method?

What type of issue is this? (place an x in one of the [ ])

Requirements (place an x in each of the [ ])

episod commented 5 years ago

Unfortunately, we don't provide schemas or Open API specs for the variety of interactive response sequences in the API.. I know this inquiry is a bit dated, but if you're still running into trouble I recommend asking Slack support or the wider community for help with this particular issue: api.slack.com/support