Skip to content

Error codes

How Authio reports errors on protocol endpoints and on the admin API, the HTTP status behind each kind of failure, and the codes you are most likely to meet.

Authio answers errors in two shapes. Protocol endpoints speak OAuth 2.0, so standard libraries understand them; the admin API wraps every error in its envelope, with a stable errorCode at the top. Both carry the same codes underneath, so a failure reported by an integration can be matched to Authio’s logs.

Errors on protocol endpoints

The endpoints under /protocol/openid-connect/ answer with the fields of RFC 6749 §5.2 — error and error_description — plus error_code, the code behind the error:

400 Bad RequestJSON
{
  "error": "invalid_grant",
  "error_description": "Authorization code expired!",
  "error_code": "AuthorizationCodeExpired"
}
errorHTTPCodes behind it
invalid_client401InvalidClientCredentials: a wrong secret, or a secret sent with a method the client is not registered for.
invalid_grant400AuthorizationCodeNotFound, AuthorizationCodeExpired, AuthorizationCodeClientMismatch, MissingCodeChallenge, MissingCodeVerifier, InvalidCodeVerifier, TokenExpired, RefreshTokenFailed, InvalidUserAuthentication, UserLockedOut, EmailNotConfirmed, UserSuspended
invalid_request400InvalidRequest, InvalidRedirectUri, MissingGrantType, MissingCodeChallengeMethod, PkceMethodNotAllowed, RequiredFields, and a client that does not exist or is inactive.
invalid_scope400InvalidScope: a scope the client has not enabled.
invalid_target400InvalidTarget: a resource the client may not reach.
unauthorized_client400GrantTypeDisabled; AccountNotEntitled when the subscription behind the application is not active.
unsupported_grant_type400UnsupportedGrantType
unsupported_response_type400UnsupportedResponseType
access_denied400A denied device request; McpIntegrationNotIncluded, ConnectedAccountsNotIncluded or IntegrationLicenseSuspended when the plan does not cover the request.
authorization_pending, slow_down, expired_token400Device flow polling: keep waiting, poll more slowly, or start again.
temporarily_unavailable429 or 5xxRate limit reached, or a service Authio depends on is unavailable. Retry later.
server_error500Something failed on Authio’s side.

Introspection and revocation never fail because of the token itself: an invalid, expired or unknown token gets 200 with active: false from introspection, and a plain 200 from revocation. UserInfo answers 401 with invalid_token, or 403 with insufficient_scope, each with a WWW-Authenticate header.

During a sign-in in the browser, errors are not JSON. Until the redirect_uri is proven, they are shown on the client’s error page; after that, they go back to the redirect_uri with error, error_description, state and iss.

Errors on the admin API

The admin API answers every failure with its envelope: success is false, the HTTP status says what kind of failure it was, errorCode names it, and notifications explains it to a person. A validation error names each refused field:

400 Bad RequestJSON
{
  "statusCode": 400,
  "success": false,
  "notifications": [
    {
      "message": "The description is too long.",
      "field": "description",
      "code": "ValidationFailed"
    }
  ],
  "errorCode": "ValidationFailed",
  "requestId": "0HN8R3K5QJ2VA:00000004"
}

Codes are names, such as NotFound or AlreadyExists, and the same name can come from different areas: a missing realm and a missing client both answer NotFound. Read the code together with the endpoint you called, and keep the requestId when you report a problem. The envelope itself is described in Admin API.

HTTP status by kind of failure

Every error Authio raises declares what kind of failure it is, and each kind answers with one status:

KindHTTPMeaning
Invalid400The request carried something the rules refuse.
Unauthorized401The caller has not proven who they are, or the proof did not hold.
PaymentRequired402The action needs a plan or a payment the account does not have.
Forbidden403The caller is known but may not do this.
NotFound404What the request names does not exist, or is not visible to the caller.
Conflict409The request clashes with the current state of what it names.
Gone410What the request names existed once and is no longer available.
Locked423What the request names is locked against the action.
NotImplemented501The action is not supported here.
UpstreamFailure502A service Authio depends on answered with a failure.
Unavailable503The capability is temporarily unavailable.
UpstreamTimeout504A service Authio depends on did not answer in time.
Anything unexpected500A failure the caller could not have caused.

Requests refused before they reach an endpoint use the same envelope: 404 for an unknown route (NotFound), 405 for a method the route does not accept (MethodNotAllowed), 415 for a body that is not JSON (UnsupportedMediaType) and 429 for a rate limit (TooManyRequests).

Common codes

Requests and validation

CodeHTTPWhat it meansWhat to do
ValidationFailed400The body broke a rule, or could not be read.Fix the fields named in notifications.
RequiredFields400Required fields are missing.Send every field the endpoint requires.
NotFound404The route or the resource does not exist, or belongs to another account.Check the path and the IDs.
Conflict409The change clashes with data saved meanwhile.Read the resource again and retry.
TooManyRequests429The rate limit was reached.Wait the seconds in Retry-After.
TemporarilyUnavailable503Authio could not reach its database or cache for a moment; nothing was changed.Wait the seconds in Retry-After and send the same request again.
UpstreamFailure, RequestTimeout502, 503, 504A service Authio depends on failed or did not answer.Retry later.
UnexpectedError500Something failed on Authio’s side.Retry; if it persists, contact support with the requestId.

Users and sign-in

CodeHTTPWhat it meansWhat to do
Unauthorized401The call carries no valid credentials.Send an API secret or a bearer token from the platform realm.
Forbidden403The caller is authenticated but lacks the permission.Grant the role, or allow it on the API secret.
InvalidCredentials401The user name or the password is wrong.Check them and try again.
LockedOut401Too many failed attempts: the account is locked for a while.Wait until the lockout ends.
PasswordExpired401The password has to be renewed.Renew it through the link sent by e-mail.
AccountNotConfirmed401The address the account was created with is not confirmed.Confirm it, then sign in again.
AccountInactive401The account was deactivated.An administrator of the realm activates it again.
ClientAccessDenied401The credentials are right, but the account has no access to this application.Give the account access to the client.
UserSuspended401The user is suspended.Lift or wait out the suspension.
SubscriptionLapsed401The account has no active plan, so sign-in is paused.Choose a plan to bring it back.
FirstPurchasePending401The account was created on a paid plan that was never paid.Finish the payment.
DuplicateUserName, DuplicateEmail409The user name or e-mail is already taken.Use another one.

Realms and clients

CodeHTTPWhat it meansWhat to do
NotFound404The realm or client does not exist, or belongs to another account.Check the realm ID and the client ID.
AlreadyExists409A realm or client with that ID already exists.Pick another ID, or read the existing one.
Inactive403The realm or client is deactivated.Activate it again.
Reserved409The ID is reserved: authio, system, platform, admin, master and internal cannot be used.Pick another ID.
SystemProtected403The platform’s own realm and client cannot be taken out of service.Leave them active.
InconsistentConfiguration400The client configuration contradicts itself and would prevent sign-in.Fix the settings named in notifications.
PublicClientHasNoSecret400A public client has no secret to rotate.Make the client confidential first, if it needs a secret.

Tokens and authorization

CodeHTTPWhat it meansWhat to do
InvalidClientCredentials401The client secret is wrong, or sent with a method the client is not registered for.Check the secret and the authentication method on the client.
GrantTypeDisabled400The grant is not enabled on the client.Enable it on the client.
InvalidRedirectUri400The redirect_uri does not equal a registered one.Register the exact address: scheme, host, port, path and query.
InvalidScope400A requested scope is not enabled on the client.Enable it, or stop asking for it.
MissingCodeChallenge400The client requires PKCE and the request carried no code_challenge.Send code_challenge and code_challenge_method.
PkceMethodNotAllowed400The code_challenge_method is not enabled on the client.Use S256, or enable the method.
InvalidCodeVerifier400The code_verifier does not match the challenge.Send the verifier the challenge was made from.
AuthorizationCodeExpired400The code is valid for 30 seconds and was exchanged too late.Exchange the code as soon as it arrives.
UnsupportedGrantType400The grant_type is not one Authio issues.Use one of the supported grants.
InvalidTarget400The resource is not a resource server the client may reach.Give the client access to the resource server.

Plan and billing

CodeHTTPWhat it meansWhat to do
RealmLimitExceeded, ClientLimitExceeded, UserLimitExceeded, ConsumerLimitExceeded, SecretLimitExceeded, ResourceServerLimitExceeded400The plan’s quota for that resource is used up.Remove what you no longer use, or move to a larger plan.
SeatLimitExceeded402Every seat of the team is taken.Free a seat or add seats.
NoActiveSubscription400The account has no active subscription.Subscribe to a plan to create realms or clients.
AccountNotEntitled403The subscription behind the application is not active, so sign-in and token issuance are paused.Renew the subscription.
McpIntegrationNotIncluded, ConnectedAccountsNotIncluded403The plan does not include MCP tokens or connected accounts.Move to a plan that includes them.
AuthLayoutNotIncluded403Customizing the login screens is not included in the plan.Move to a plan that includes it.
SharedTenancyNotIncluded403The account is on the Dedicated plan, so realms and clients are not created on the shared platform.Create them in your environment’s own console.

AI advisor

CodeHTTPWhat it meansWhat to do
AiAdvisorNotIncludedInPlan403The AI advisor is not included in the plan.Move to a plan that includes it.
AiAdvisorNotEnabled409The advisor is not turned on for this realm or client.Turn it on for that realm or client.
AiAdvisorRequiresAccountOperator403Only a person signed in to the console can use the advisor; machine credentials such as API keys cannot.Call it from a signed-in session.
AiAdvisorNotConfigured503The advisor is not available on this deployment.On a Dedicated environment, set ANTHROPIC_API_KEY in Configuration.
AiAnalysisAlreadyRunning, AiConfigurationAlreadyRunning, AiAccessReviewAlreadyRunning, AiDashboardSummaryAlreadyRunning409The same reading is already being produced.Wait for it to finish before asking again.
AiConfigurationNotActionable409The proposal is not in a state that allows this: it carries no changes, was already applied, or was never applied.Reload the proposal.
AiConfigurationStale409The client changed after the proposal was made, so applying it would undo that change.Ask for a new proposal.
AiAccessReviewPeriodInvalid400The period must last at least one hour and at most 90 days, and end no later than now.Pick a period within those bounds.
AiTokenShapeCarriesToken400The token shape sent for analysis carries the token itself.Send the token’s shape without the token.
AiRunLimitExceeded400The plan’s AI runs for the period are used up.Wait until the count starts again, or move to a larger plan.

Dedicated environment

CodeHTTPWhat it meansWhat to do
DedicatedInstanceNotFound404The account has no environment yet.It is prepared as soon as the subscription is confirmed.
DedicatedInstanceNotReady409The environment is not running, so it cannot be changed.Try again once it is ready.
DedicatedSubscriptionMissing409No live Dedicated subscription covers the account.Subscribe to the Dedicated plan.
DedicatedVariableNotEditable400The variable is managed by the platform.Change only the variables listed in Configuration.
DedicatedAdminCredentialUnavailable409The first administrator’s password was already shown and is no longer kept.Use password recovery on your environment’s sign-in page.
DedicatedDomainInvalid400The host names cannot be used: invalid, equal, not under the same domain, or under the platform’s domain.Use two host names of yours under one domain.
DedicatedDomainAlreadySet409The environment already has a domain of your own.Remove it before adding another.
DedicatedDomainNotReady409The domain’s certificates are not issued yet.Check the DNS records and try again in a few minutes.
DedicatedServiceNotRunning409The service has no running deployment.Redeploy it to start it.
DedicatedDeploymentNotFound404The deployment is not one of the environment’s recent deployments.Reload the services and pick it again.
DedicatedDeploymentNotCancellable409Only a deployment still being built or rolled out can be cancelled.Nothing to cancel; redeploy if needed.
DedicatedInstanceRemovalFailed502The hosting provider did not finish removing the environment.Remove it again; it picks up where it stopped.

Next steps