Tools › API error codes
Discord API error codes
Search a code or a word from the error. Each one says what went wrong and how to fix it, with a link you can share.
0 General error
Something went wrong that has no special code. Read the message text and the HTTP status. Link to this code
10001 Unknown account
The account does not exist or was deleted. Link to this code
10002 Unknown application
Wrong application ID, or the app was deleted. Link to this code
10003 Unknown channel
The channel ID is wrong, the channel was deleted, or the bot cannot see it. Check the ID and the bot's View Channel permission. Link to this code
10004 Unknown guild
The bot is not in this server, or the server ID is wrong. Link to this code
10006 Unknown invite
The invite expired, was deleted or the code is wrong. Link to this code
10007 Unknown member
That user is not in the server (left, or never joined). Fetch members only for people who are in it. Link to this code
10008 Unknown message
The message was deleted, or it is in another channel. Common when you reply to or delete a message twice. Link to this code
10011 Unknown role
The role was deleted or the ID is wrong. Link to this code
10013 Unknown user
No user has this ID. Link to this code
10014 Unknown emoji
The emoji was deleted or is from a server the bot is not in. Link to this code
10015 Unknown webhook
The webhook was deleted or the token changed. Make a new webhook. Link to this code
10026 Unknown ban
The user is not banned, so there is nothing to unban. Link to this code
10057 Unknown guild template
The template code is wrong or the template was deleted. Link to this code
10060 Unknown sticker
The sticker was deleted or is not available to the bot. Link to this code
10062 Unknown interaction
You answered the interaction too late (after 3 seconds) or twice. Defer the reply first with deferReply() when work takes longer. Link to this code
10063 Unknown application command
The command ID is wrong, or the command was deleted. Register your commands again. Link to this code
20001 Bots cannot use this endpoint
This route is for user accounts only. Link to this code
20002 Only bots can use this endpoint
Use a bot token for this route. Link to this code
20009 Explicit content cannot be sent to the desired recipient(s)
The user's safety settings blocked the content. Link to this code
20012 You are not authorized to perform this action on this application
The token belongs to another app, or you are not on the app's team. Link to this code
20016 This action cannot be performed due to slowmode rate limit
The channel has slowmode. Wait, or give the bot Manage Messages or Manage Channel to skip it. Link to this code
20028 The channel you are writing has hit the write rate limit
Too many messages in this channel too fast. Slow down. Link to this code
30001 Maximum number of guilds reached (100)
A user account can be in 100 servers (200 with Nitro). Link to this code
30003 Maximum number of pins reached for the channel (50)
Unpin something first. Link to this code
30005 Maximum number of guild roles reached (250)
Delete roles you do not use. Link to this code
30007 Maximum number of webhooks reached (15)
A channel can have 15 webhooks. Delete old ones. Link to this code
30008 Maximum number of emojis reached
The server is full of emojis for its boost level. Remove some or boost the server. Link to this code
30010 Maximum number of reactions reached (20)
A message can have 20 different reactions. Link to this code
30013 Maximum number of guild channels reached (500)
Delete channels you do not use. Link to this code
30015 Maximum number of attachments in a message reached (10)
Send at most 10 files per message. Link to this code
30016 Maximum number of invites reached (1000)
Delete old invites. Link to this code
30032 Maximum number of application commands reached
An app can have 100 global slash commands. Link to this code
30034 Max number of daily application command creates has been reached (200)
Do not re-create every command on each start; update them with one bulk PUT instead. Link to this code
40001 Unauthorized. Provide a valid token and try again
The token is missing, wrong or was reset. Copy a fresh token and keep it secret. Link to this code
40002 You need to verify your account in order to perform this action
The user account has to verify its e-mail or phone. Link to this code
40005 Request entity too large
The file is bigger than the upload limit of the server. Link to this code
40007 The user is banned from this guild
Unban them before inviting or adding them. Link to this code
40060 Interaction has already been acknowledged
You replied twice. After deferReply() use editReply() or followUp(). Link to this code
50001 Missing access
The bot cannot see the channel or server. Give its role View Channel (and check channel overrides). Link to this code
50005 Cannot edit a message authored by another user
A bot can edit only its own messages. Link to this code
50006 Cannot send an empty message
Add content, an embed, a file or a component. Link to this code
50007 Cannot send messages to this user
The user blocks DMs from server members, blocked the bot or shares no server with it. Catch the error and move on. Link to this code
50008 Cannot send messages in a non-text channel
The channel is a category or a voice channel without text. Link to this code
50013 You lack permissions to perform that action
The bot is missing a permission, or the target's highest role is above the bot's. Move the bot's role higher and check channel overrides. Link to this code
50021 Cannot execute action on a system message
Join messages and other system messages cannot be edited this way. Link to this code
50024 Cannot execute action on this channel type
For example, threads in a voice channel. Check the channel type. Link to this code
50025 Invalid OAuth2 access token provided
The access token expired or was revoked. Refresh it. Link to this code
50027 Invalid webhook token provided
The webhook URL is wrong or the webhook was reset. Link to this code
50033 Invalid Recipient(s)
You cannot DM that user. Link to this code
50034 A message provided was too old to bulk delete
Bulk delete works only on messages younger than 14 days. Link to this code
50035 Invalid Form Body
A field is missing, too long or the wrong type. The "errors" object in the answer names the field. Link to this code
50041 Invalid API version provided
Use a current API version, like /api/v10. Link to this code
50083 Operation cannot be performed on an archived thread
Unarchive the thread first. Link to this code
50109 The request body contains invalid JSON
Check quotes, commas and that you send Content-Type: application/json. Link to this code
60003 Two factor is required for this operation
The server requires 2FA for moderators; the bot owner's account needs 2FA on. Link to this code
90001 Reaction was blocked
The user blocked the bot, or the bot cannot react in this channel. Link to this code
130000 API resource is currently overloaded. Try again a little later
Discord is busy. Wait and try again. Link to this code
160002 Cannot reply without permission to read message history
Give the bot Read Message History in that channel. Link to this code
160004 A thread has already been created for this message
Use the existing thread. Link to this code
160005 Thread is locked
Unlock it, or give the bot Manage Threads. Link to this code
How to use it
- Find the codeIt is the "code" number in the error JSON, next to "message".
- Search itType the number or a word from the message.
- Fix itEach code has the usual cause and the fix.
Questions
What is the difference between the HTTP status and the code?
The HTTP status (403, 404…) is the kind of problem. The JSON code (50013, 10008…) says exactly what happened.
Why do I get 50013 when the bot has the permission?
Role order: a bot cannot act on members or roles above its own highest role. Channel overrides can also remove the permission.
How do I avoid 10062 Unknown interaction?
Answer within 3 seconds. If your command does slow work, call deferReply() first and edit the reply later.
Related tools
Made a bot? List it on Nunu List and post your server count with the API.