Response/Error Codes

HTTP Response/Error Codes

Our API will return semantically valid HTTP response codes based on the success of your request. The following table can be used as a reference for response codes it will return.
HTTP Response/Error Code List
200 (OK)The request completed successfully
201 (CREATED)The entity was created successfully
204 (NO CONTENT)The request completed successfully but returned no content
304 (NOT MODIFIED)The entity was not modified (no action was taken)
400 (BAD REQUEST)The request was improperly formatted, or the server couldn't understand it
401 (UNAUTHORIZED)The Authorization header was missing or invalid
403 (FORBIDDEN)The Authorization token you passed did not have permission to the resource
404 (NOT FOUND)The resource at the location specified doesn't exist
405 (METHOD NOT ALLOWED)The HTTP method used is not valid for the location specified
429 (TOO MANY REQUESTS)You've made too many requests, see Rate Limits
502 (GATEWAY UNAVAILABLE)There was not a gateway available to process your request. Wait a bit and retry
5xx (SERVER ERROR)The server had an error processing your request (these are rare)

JSON Error Response

Along with the HTTP error code, our API can also return more detailed error codes through a code key in the JSON error response. The response will also contain a message key containing a more friendly error string.
JSON Error Codes
10001Unknown account
10002Unknown application
10003Unknown channel
10004Unknown guild
10005Unknown integration
10006Unknown invite
10007Unknown member
10008Unknown message
10009Unknown overwrite
10010Unknown provider
10011Unknown role
10012Unknown token
10013Unknown user
10014Unknown Emoji
20001Bots cannot use this endpoint
20002Only bots can use this endpoint
30001Maximum number of guilds reached (100)
30002Maximum number of friends reached (1000)
30003Maximum number of pins reached (50)
30005Maximum number of guild roles reached (250)
30010Too many reactions
30013Maximum number of guild channels reached (500)
50001Missing access
50002Invalid account type
50003Cannot execute action on a DM channel
50004Embed disabled
50005Cannot edit a message authored by another user
50006Cannot send an empty message
50007Cannot send messages to this user
50008Cannot send messages in a voice channel
50009Channel verification level is too high
50010OAuth2 application does not have a bot
50011OAuth2 application limit reached
50012Invalid OAuth state
50013Missing permissions
50014Invalid authentication token
50015Note is too long
50016Provided too few or too many messages to delete. Must provide at least 2 and fewer than 100 messages to delete.
50019A message can only be pinned to the channel it was sent in
50021Cannot execute action on a system message
50034A message provided was too old to bulk delete
50035Invalid Form Body
50036An invite was accepted to a guild the application's bot is not in
90001Reaction Blocked
Example JSON Error Response
    "code": 50014,
    "message": "Invalid authentication token"