Discord API · error code

Discord error 40060: Interaction has already been acknowledged

Permanent - do not retryHTTP 400Interactions and slash commands

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Interaction has already been acknowledged

What error 40060 means

You sent a second initial response to an interaction that already had one. Every interaction gets exactly one initial response through POST /interactions/{id}/{token}/callback, whether that is a message, a deferral, a modal, or an update. After that, anything further must go through the follow-up webhook routes (PATCH .../messages/@original or POST /webhooks/{application.id}/{token}). Calling the callback endpoint twice produces 40060.

In library terms this is reply() after deferReply(), reply() twice in one handler, or showModal() after a reply. It is the mirror image of 10062: 10062 is "you were too late to acknowledge", 40060 is "you acknowledged twice". Developers who fix 10062 by adding a defer at the top and forget to change the later reply() to editReply() move straight from one error to the other.

A subtler source is duplicate event delivery: two processes (a dev instance and a prod instance with the same token, or two shards overlapping) both receive the interaction and both try to respond. The first wins; the second gets 40060.

The broken and fixed versions differ by one method name:

// discord.js - wrong: two initial responses
await interaction.deferReply();
await interaction.reply('done');        // -> DiscordAPIError[40060]

// discord.js - right: defer once, then edit
await interaction.deferReply();
await interaction.editReply('done');

# discord.py - right
await interaction.response.defer()
await interaction.edit_original_response(content='done')

In discord.py the equivalent mistake is calling interaction.response.send_message() after interaction.response.defer(), which raises InteractionResponded locally or surfaces 40060 from the API. Both libraries expose state you can branch on, interaction.deferred and interaction.replied in discord.js, interaction.response.is_done() in discord.py, so shared error-reporting code can pick the correct send method instead of guessing.

What it looks like

{
  "message": "Interaction has already been acknowledged.",
  "code": 40060
}

Why it happens

  • reply() called after deferReply() or after a previous reply() in the same handler
  • Two code paths (for example a middleware and the command) both acknowledge
  • Two bot processes running with the same token and both handling the interaction
  • Retry logic re-sending the initial callback after a timeout, when the first actually succeeded
  • Library auto-defer plus a manual defer in user code

How to fix Discord error 40060

  1. 1After a deferral, use editReply() / edit_original_response() (PATCH .../@original) or followUp() instead of reply()
  2. 2Ensure each handler has exactly one acknowledgement path; return after sending it
  3. 3Check for duplicate running instances (same token in dev and prod) and stop one
  4. 4For modals, show the modal as the initial response and reply to the modal submit interaction separately; they are distinct interactions
  5. 5Do not retry the callback endpoint on ambiguous errors; retry follow-ups instead

How to stop it recurring

Structure handlers as: acknowledge once at the top, then only ever edit or follow up. Many libraries expose interaction.deferred and interaction.replied flags; a small helper that picks reply versus editReply based on those flags removes the whole class of bug.

The one-initial-response rule and the follow-up window it hands you are on the Discord limits page; if you arrived here after fixing 10062, the defer-then-edit pattern there is the other half of this fix.

Duplicate-process 40060s deserve an alert of their own, because they mean two deployments share one token and every other interaction is being answered twice.

Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.

Related codes

Error 40060 - quick answers

What does Discord error 40060 mean?

You sent a second initial response to an interaction that already had one. Every interaction gets exactly one initial response through POST /interactions/{id}/{token}/callback, whether that is a message, a deferral, a modal, or an update. After that, anything further must go through the follow-up webhook routes (PATCH .../messages/@original or POST /webhooks/{application.id}/{token}).

How do I fix Discord error 40060?

1. After a deferral, use editReply() / edit_original_response() (PATCH .../@original) or followUp() instead of reply() 2. Ensure each handler has exactly one acknowledgement path; return after sending it 3. Check for duplicate running instances (same token in dev and prod) and stop one 4. For modals, show the modal as the initial response and reply to the modal submit interaction separately; they are distinct interactions 5. Do not retry the callback endpoint on ambiguous…

Should I retry after error 40060?

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 Discord by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.