0

My goal is to trigger modal open using Slack slash command. I got the trigger_id from the slash command in my slack app, and trying to open modal using it, but getting following error though I can see valid trigger_id in my console logs.

Error in trigger handler Error: An API error occurred: invalid_trigger_id
Ping Zhao
  • 266
  • 5
  • 19

1 Answers1

0

This is because of my bad. I used push method instead of open method to open modal. It is working after changing my code like this:

await bot.api.views.open({
    trigger_id: triggerId //You can get from slash command payload,
    view: view // this is the modal content view
})
Ping Zhao
  • 266
  • 5
  • 19