Error codes

The developer API's error format and the list of codes, with their HTTP status, meaning and what to do.

On this page Format Codes by status 400 — malformed request401 — authentication402 — plan403 — access denied404 — not found409 — conflict415 and 413422 — rejected data429 — too many requests5xx — server side Retrying properly

Format

Every error has the same shape:

{
  "error": "missing_scope",
  "message": "This API key does not have the “messages.write” scope.",
  "details": { "required": "messages.write" }
}
Field Description
error Stable code, meant to be tested by your program
message Readable text, in French or English depending on the Accept-Language header. Do not parse it: it may be reworded
details Optional extra: faulty field, expected value, limit, action ID…

For a validation error (422 invalid), details maps each faulty field to its message:

{ "error": "invalid", "message": "Invalid body.", "details": { "amount": "Non-zero integer required." } }

A 429 response adds the Retry-After header (seconds). A 401 response adds WWW-Authenticate: Bearer.

Codes by status

400 — malformed request

Code Cause What to do
invalid_id An ID is not numeric (details.field gives the field) Send the Discord ID, as a string of digits
invalid_limit limit outside 1 to 100 Fix the parameter
invalid_cursor Unknown or altered cursor Start over without a cursor, or with latest for events
invalid_types types contains an unknown event type See the types
invalid_wait wait is not valid An integer from 0 to 25 (true or false for writes)
invalid_idempotency_key Idempotency-Key too long or with non-ASCII characters 100 visible characters at most
bad_request Unreadable JSON, invalid header Check your request body

401 — authentication

Code Cause What to do
api_key_required No Authorization: Bearer rbt_… header Add the header
bad_api_key Key copied wrongly or unknown Copy the key again; if lost, create a new one
revoked_api_key Revoked key Create a new key
bridge_token_required No bridge token Send Authorization: Bearer rbb_…
bad_bridge_token Unknown or regenerated bridge token Take the bridge's current token

402 — plan

Code Cause What to do
plan_required The server lacks the required plan (Premium or higher). details.required gives the plan Upgrade to the indicated plan
limit_reached Maximum count reached (keys, bridges, webhooks, simultaneous giveaways). details.limit Delete an item or change plan

403 — access denied

Code Cause What to do
missing_scope The key lacks the route's scope. details.required Create a key with that scope
key_guild_mismatch The key is restricted to another server Use the right key, or a key with no server restriction
no_access The key's (or bridge's) owner no longer has access to this server Recreate the key from a manager account
banned Suspended account Contact support
bridge_disabled The bridge is disabled Re-enable it in the dashboard
forbidden Only the owner and managers manage keys, bridges and webhooks Ask a manager
console_disabled Console commands disabled for this bridge See Bridges
role_denied You do not have one of the roles allowed to send commands Ask for the role
command_not_allowed The command is not in the whitelist Add it (carefully)
link_disabled Account linking disabled for this bridge Enable it in the bridge settings

404 — not found

Code Cause
not_found The resource (key, bridge, webhook, action, link) does not exist or is not yours
member_not_found The member is unknown to Robert and to Discord on this server
message_not_found The message was not sent by the API (only those can be edited)
role_not_found The role does not exist on the server
bridge_not_found The bridge no longer exists (token of a deleted bridge)
no_bridge No bridge matches the request

409 — conflict

Code Cause What to do
bot_missing Robert is not on this Discord server Add the bot
idempotency_in_progress A request with the same Idempotency-Key is running Retry in a moment
channel_in_use This channel is already linked to another bridge Pick another channel
bridge_offline The bridge has not beaten for 90 seconds Check that the application is running
ambiguous_bridge Several bridges match Specify which one

415 and 413

unsupported_media_type (415): the body is not JSON, add Content-Type: application/json. payload_too_large (413): the body exceeds 1 MB.

422 — rejected data

Code Cause What to do
invalid Validation: details lists the faulty fields Fix each field
invalid_url Invalid webhook or avatar URL (not HTTPS, credentials, refused port…) See accepted URLs
private_address The URL targets a private, local or reserved address Use a public address
unresolvable The host name does not resolve Check DNS
invalid_command Empty command, too long (256 characters) or with a line break Fix the command
batch_too_large More than 50 events in a batch (details.max) Split into batches
role_not_assignable @everyone role or one managed by an integration Pick another role
cannot_target_owner The server owner cannot be sanctioned —
idempotency_key_reused The same Idempotency-Key was used for another request Generate a new key per operation

429 — too many requests

Code Cause What to do
quota_exceeded The key's daily quota is reached (details.limit, details.reset) Wait Retry-After, or the reset at midnight UTC
rate_limited Per-minute limit exceeded (requests, console commands, link codes) Wait Retry-After then retry

5xx — server side

Status Code Cause What to do
502 action_failed The bot could not run the action (role too high, missing permission, member gone…). details.result gives the reason Fix the cause and retry
502 discord_error Discord answered with an error Retry later
503 bot_unavailable Discord is not available on Robert's side Retry later
500 server_error Internal error Retry; if it persists, tell support with the request time

Retrying properly

  • Never retry a 4xx error (except 429, and 409 idempotency_in_progress): the request would be refused the same way.
  • Retry a 429, a 502, a 503 or a network error with a growing delay (1 s, 2 s, 4 s…), honoring Retry-After.
  • For a write, retry with the same Idempotency-Key: if the first attempt went through, you get its response instead of a duplicate.