Menu AuthGuardHelp centre
Portuguêsauthguard.pt

Developers · API

API errors and request limits

  • 1 min read
  • SaaS · Self-hosted

Every API route returns errors in one envelope. Use the code to decide; the message is for people only and may change.

The envelope

{"error": {"code": "validation_error", "message": "request body is invalid", "field": "body"}}

field appears when the error concerns a specific field.

Most common codes

HTTPcodeWhat to do
400invalid_request, invalid_idempotency_keyFix the request
401unauthorizedGet a new token
403forbidden, insufficient_scopeMissing permission or scope
404not_foundThe resource does not exist or belongs to another client
409conflictIdempotency or state; read the current state
422validation_error, invalid_cursorFix the field; restart the list
429rate_limitedWait Retry-After
503service_unavailable, service_busyWait Retry-After and retry
500internal_errorRetry later; if it persists, contact support with the time

The full list, with causes and fixes, is in the error code index.

Limits (approval requests)

Per 60 seconds, per client and source network: 30 token requests, 120 creations, 600 reads and 1,200 calls in all. At most 20 pending requests per person and 1,000 per client.

How do I retry safely?

  • Retry only idempotent calls or calls with an Idempotency-Key.
  • Use jittered exponential backoff and honour Retry-After.
  • Never generate a new idempotency key for the same operation.
  • Do not retry a 4xx other than 429 without changing the request.

Error codes in this article

Article referencedev-errors-limitsquote it to support to identify this article. Checked against the product at commit 5f6607a8.