Slack Error: 'exchanged_trigger_id' — Cause, Fix, and Troubleshooting Guide
Fix the Slack exchanged_trigger_id error: a trigger_id can only open one view. Don't reuse or retry it. Get a fresh trigger from another interaction.
- #slack
- #api
- #troubleshooting
- #errors
Stuck on this Slack error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
Overview
exchanged_trigger_id is returned by views.open when the trigger_id was already used to open a view. A trigger is single-use: once it has been exchanged for a view, calling views.open with it again fails.
{
"ok": false,
"error": "exchanged_trigger_id"
}
Symptoms
- The first
views.opensucceeds; a duplicate call with the sametrigger_idfails. - Retries after a successful open (or after a network timeout that actually succeeded) fail.
- Two code paths both try to open a modal from one interaction.
Common Root Causes
1. Opening two views from one trigger
A trigger can open exactly one root view. A second views.open (e.g. to open another modal) is rejected — use views.push instead.
2. Retrying after an apparent failure
A network timeout where the first views.open actually succeeded, followed by a retry with the same trigger_id, hits this error.
3. Duplicate event handling
The same interaction is processed twice (double-registered handler, redelivered event), each attempting to open a view.
How to diagnose
Open once, then reuse the same trigger:
# First call succeeds
curl -s -X POST https://slack.com/api/views.open \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"trigger_id":"12345.67890.abcdef","view":{"type":"modal","title":{"type":"plain_text","text":"Setup"},"blocks":[]}}'
# Second call with the SAME trigger_id
{"ok": false, "error": "exchanged_trigger_id"}
Fixes
- Open exactly one root view per trigger. To stack more screens, use
views.push(which needs its own freshtrigger_idfrom an interaction inside the modal) — not anotherviews.open. - Make handlers idempotent: dedupe on the interaction/event id so a redelivered event doesn’t open twice.
- Don’t blindly retry
views.open. If it times out, check whether the view actually opened before retrying; a fresh trigger is required to try again.
What to watch out for
views.pushalso consumes a trigger — each push needs a newtrigger_idobtained from an action inside the current modal.- Slack can redeliver events; guard your interaction handler against duplicates to avoid
exchanged_trigger_idstorms. - This is close kin to
expired_trigger_idandinvalid_trigger_id; log which one you got so you fix the right cause (reuse vs timeout vs malformed).
Related
- Slack Error: ‘expired_trigger_id’
- Slack Error: ‘invalid_payload’
- Slack multi-step modal view-stack wizards
Fixed it? Get 500 Slack & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.