Slack error duplicate_external_id: external_id already in use
Last verified against Slack API reference - chat.postMessage errors
Error returned when the given external_id has already be used.What error duplicate_external_id means
The external_id you set on a view is already attached to another view. Slack's text is "Error returned when the given external_id has already be used." It is listed on views.open, views.push, views.publish and views.update.
An external_id is your own handle for a view so you can update it later without tracking Slack's view_id. The views.open notes set the rule: it "must be unique for all views on a team, and it has a max length of 255 characters." Unique across the whole workspace, not per user or per session.
So a fixed value like "approval_modal" works the first time and then collides for the next user or the next time the same user opens it. Retried opens that reuse the ID, and two environments sharing a workspace with the same naming scheme, trigger it too.
What it looks like
POST /api/views.open
{"trigger_id": "...", "view": {"type": "modal", "external_id": "approval_modal", ...}}
{"ok": false, "error": "duplicate_external_id"}Why it happens
- A constant external_id was reused for every modal opened.
- The ID was unique per user but not per opening.
- A retry of views.open reused the same external_id.
- Staging and production generated identical IDs in the same workspace.
How to fix Slack error duplicate_external_id
- 1Make external_id unique per view instance, for example
- - . - 2Keep it at 255 characters or less.
- 3Store the external_id you generated so later views.update calls can use it.
- 4If you do not need it, leave external_id out and use the returned view.id.
How to stop it recurring
Generate external_id values with a random or time-based component and an environment prefix. Keep the purpose of the view in callback_id, which is allowed to repeat, rather than in external_id. Store each generated ID next to the view it belongs to so updates use the right one.
Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.
Related codes
- not_found: View not foundError returned when the given view_id or external_id doesn't exist.
- hash_conflict: View hash does not match current stateError returned when the provided hash doesn't match the current stored value.
- exchanged_trigger_id: trigger_id was already usedThe trigger_id was already exchanged in a previous call.
- invalid_arguments: Method called with invalid argumentsThe method was called with invalid arguments.
Error duplicate_external_id - quick answers
What does Slack error duplicate_external_id mean?
The external_id you set on a view is already attached to another view. Slack's text is "Error returned when the given external_id has already be used." It is listed on views.open , views.push , views.publish and views.update . An external_id is your own handle for a view so you can update it later without tracking Slack's view_id .
How do I fix Slack error duplicate_external_id?
1. Make external_id unique per view instance, for example - - . 2. Keep it at 255 characters or less. 3. Store the external_id you generated so later views.update calls can use it. 4. If you do not need it, leave external_id out and use the returned view.id.
Should I retry after error duplicate_external_id?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Slack by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.