Reputation: 29
I am using apex to invoke the modal in slack and a bit confused on how to use the response_action for closing it.
{
"response_action": "clear"
}
Do I need to make an HTTP request and if yes what will be the endpoint and what will be the structure of JSON?
Upvotes: 2
Views: 6280
Reputation: 21
You don't need to make any Api call to close the modal , you have to send back 200 to close the current view.If you want to close all views you can return { "response_action": "clear" }
Upvotes: 2
Reputation: 29
All I had to do was send back an HTTP 200 because I had only one view open but if multiple views are there we can use
{
"response_action": "clear"
}
Referred to the documentation here- https://api.slack.com/surfaces/modals/using#close_current_view
Upvotes: -1