Skip to main content
Docs

Frontend API errors

An index of Clerk Frontend API errors.

Actor Tokens

ActorTokenAlreadyUsed

Status Code: 400
{
  "shortMessage": "actor token has already been used",
  "longMessage": "This actor token has already been used. Each token can only be used once.",
  "code": "actor_token_already_used_code"
}
Status Code: 400
{
  "shortMessage": "not in sign in",
  "longMessage": "Actor tokens can only be used during sign in.",
  "code": "actor_token_not_in_sign_in_code"
}
Status Code: 400
{
  "shortMessage": "actor token cannot be used",
  "longMessage": "This actor token cannot be used anymore. Please request a new one.",
  "code": "actor_token_cannot_be_used_code"
}
Status Code: 400
{
  "shortMessage": "actor token has been revoked",
  "longMessage": "This actor token has been revoked and cannot be used anymore.",
  "code": "actor_token_revoked_code"
}
Status Code: 404
{
  "shortMessage": "user not found",
  "longMessage": "The user of the actor token no longer exists. Please request a new one.",
  "code": "actor_token_subject_not_found"
}

Auth

IdentificationExists

IdentificationExists signifies an error when the identifier already exists

Status Code: 400
{
  "shortMessage": "already exists",
  "longMessage": "This <identifier> already exists.",
  "code": ""
}
Status Code: 403
{
  "shortMessage": "Email subaddress not allowed.",
  "longMessage": "Email address must not contain the characters '+', '=', or '#'.",
  "code": "not_allowed_access",
  "meta": {
    "name": "email_address"
  }
}
Status Code: 403
{
  "shortMessage": "Access not allowed.",
  "longMessage": "<who> <pluralization> not allowed to access this application.",
  "code": "not_allowed_access",
  "meta": "{\"Identifiers\": identifiers}"
}

InvalidAuthentication

InvalidAuthentication signifies an error when the request is not authenticated

Status Code: 401
{
  "shortMessage": "Invalid authentication",
  "longMessage": "Unable to authenticate the request, you need to supply an active session",
  "code": "authentication_invalid"
}

InvalidAuthorization

InvalidAuthorization signifies an error when the request is not authorized to perform the given operation

Status Code: 403
{
  "shortMessage": "Unauthorized request",
  "longMessage": "You are not authorized to perform this request",
  "code": "authorization_invalid"
}

InvalidAuthorizationHeaderFormat

InvalidAuthorizationHeaderFormat signifies an error when the Authorization header has no proper format.

Status Code: 401
{
  "shortMessage": "Invalid Authorization header format",
  "longMessage": "Invalid Authorization header format. Must be 'Bearer <YOUR_API_KEY>'",
  "code": "authorization_header_format_invalid"
}

InvalidCSRFToken

InvalidCSRFToken signifies an error when the request does not contain a CSRF token or the given token is invalid

Status Code: 403
{
  "shortMessage": "Invalid or missing CSRF token",
  "longMessage": "To protect against CSRF attacks, the given request must include a valid CSRF token.",
  "code": "csrf_token_invalid"
}
Status Code: 400
{
  "shortMessage": "invalid handshake",
  "longMessage": "The handshake request is invalid: <reason>",
  "code": "invalid_handshake"
}

InvalidHost

InvalidHost signifies an error when the incoming request has an invalid host

Status Code: 400
{
  "shortMessage": "Invalid host",
  "longMessage": "We were unable to attribute this request to an instance running on Clerk. Make sure that your Clerk Publishable Key is correct.",
  "code": "host_invalid"
}

InvalidOriginHeader

InvalidOriginHeader signifies an error when the origin header of the incoming request is invalid

Status Code: 400
{
  "shortMessage": "Invalid HTTP Origin header",
  "longMessage": "The Request HTTP Origin header must be equal to or a subdomain of the requesting URL.",
  "code": "origin_invalid"
}

InvalidRequestForEnvironment

InvalidRequestForEnvironment signifies an error when the incoming request is invalid for given environment(s)

Status Code: 400
{
  "shortMessage": "Invalid request for environment",
  "longMessage": "Request only valid for <envTypes> instances.",
  "code": "request_invalid_for_environment"
}

InvalidUserSettings

InvalidUserSettings signifies an error where the auth settings of the instance are not well configured, which results in sign in and sign up endpoints to be restricted.

Status Code: 409
{
  "shortMessage": "invalid auth configuration",
  "longMessage": "The authentication settings are invalid.",
  "code": "user_settings_invalid"
}

MissingRequestHeadersForNonStandardBrowsers

MissingRequestHeadersForNonStandardBrowsers signifies an error when the incoming request is missing mandatory headers

Status Code: 400
{
  "shortMessage": "Invalid request headers",
  "longMessage": "Your Clerk Frontend API is accessible from browsers and native applications. To protect against common web attacks, we require the HTTP Authorization header to be present in native application requests. Make sure the HTTP Authorization header is set a valid Clerk client JWT or set it to an empty string for your first Frontend API request that will return your Clerk client JWT.",
  "code": "request_header_missing"
}

MissingRequestHeadersForStandardBrowsers

MissingRequestHeadersForStandardBrowsers signifies an error when the incoming request is missing mandatory headers

Status Code: 400
{
  "shortMessage": "Invalid request headers",
  "longMessage": "Your Clerk Frontend API is accessible from browsers and native applications. To protect against standard web attacks, the HTTP Origin header is required in browser requests. If you see this error, you probably accessed Clerk Frontend API directly from the address bar or a browser extension is intercepting your browser requests, removing the HTTP Origin header. For more information refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin.",
  "code": "request_header_missing"
}
Status Code: 400
{
  "shortMessage": "Multiple 'Authorization' header values",
  "longMessage": "Setting multiple values in the 'Authorization' header is forbidden",
  "code": "multiple_authorization_header_values_forbidden"
}
Status Code: 400
{
  "shortMessage": "Multiple 'Origin' header values",
  "longMessage": "Setting multiple values in the 'Origin' header is forbidden",
  "code": "multiple_origin_header_values_forbidden"
}

NativeAPIDisabled

NativeAPIDisabled signifies an error when the incoming request is from a native client (\_is\_native={1|true}) and the instance is not configured to allow native API requests.

Status Code: 400
{
  "shortMessage": "Native API disabled",
  "longMessage": "The Native API is disabled for this instance. Visit the Clerk Dashboard to enable it.",
  "code": "native_api_disabled"
}
Status Code: 400
{
  "shortMessage": "Setting both the 'Origin' and 'Authorization' headers is forbidden",
  "longMessage": "For security purposes, only one of the 'Origin' and 'Authorization' headers should be provided, but not both. In browser contexts, the 'Origin' header is set automatically by the browser. In native application contexts (e.g. mobile apps), set the 'Authorization' header.",
  "code": "origin_authorization_headers_conflict"
}

SignedOut

SignedOut signifies an error when a user is signed out

Status Code: 401
{
  "shortMessage": "Signed out",
  "longMessage": "You are signed out",
  "code": "signed_out"
}
Status Code: 403
{
  "shortMessage": "Unsupported country code",
  "longMessage": "Phone numbers from this country (<countryName>) are currently not supported. For more information, please contact <support>.",
  "code": "unsupported_country_code",
  "meta": "{\"formParameter\": {\"Name\": \"param\"}, \"Alpha2\": alpha2, \"CountryCode\": countryCode}"
}

URLBasedSessionSyncingDisabled

URLBasedSessionSyncingDisabled signifies an error when the incoming request attempts to use an endpoint with URL-based session syncing, when the instance operates with third-party cookies instead.

Status Code: 400
{
  "shortMessage": "URL-based session syncing is disabled for this instance",
  "longMessage": "This is a development instance operating with legacy, third-party cookies. To enable URL-based session syncing refer to https://clerk.com/docs/upgrade-guides/url-based-session-syncing.",
  "code": "url_based_session_syncing_disabled"
}
Status Code: 400
{
  "shortMessage": "Backup codes not available",
  "longMessage": "In order to use backup codes, you have to enable any other Multi-factor method",
  "code": "backup_codes_not_available"
}

Clients

ClientNotFound

ClientNotFound signifies an error when no client is found with clientID

Status Code: 404
{
  "shortMessage": "Client not found",
  "longMessage": "No client was found with id <clientID>",
  "code": "resource_not_found"
}

ClientNotFoundInRequest

ClientNotFoundInRequest signifies an error when no client is found in an incoming request

Status Code: 400
{
  "shortMessage": "No client found",
  "longMessage": "This request is expecting a client and did not find one",
  "code": "client_not_found"
}
Status Code: 422
{
  "shortMessage": "Annual plan period not supported",
  "longMessage": "Annual plan period not supported",
  "code": "annual_plan_period_not_supported"
}
Status Code: 403
{
  "shortMessage": "access denied",
  "longMessage": "The billing feature is not enabled for this instance. You can enable it at https://dashboard.clerk.com.",
  "code": "billing_not_enabled"
}
Status Code: 409
{
  "shortMessage": "Another checkout is already in progress",
  "longMessage": "Another checkout is already in progress",
  "code": "checkout_already_in_progress"
}
Status Code: 404
{
  "shortMessage": "Checkout not found",
  "longMessage": "Checkout not found",
  "code": "checkout_not_found"
}
Status Code: 422
{
  "shortMessage": "External payments not setup",
  "longMessage": "External payments not setup",
  "code": "external_payments_not_setup"
}
Status Code: 400
{
  "shortMessage": "Invalid gateway type",
  "longMessage": "Gateway type is invalid",
  "code": "invalid_gateway_type"
}
Status Code: 400
{
  "shortMessage": "Invalid plan change",
  "longMessage": "Please choose a different plan or billing interval, or contact support.",
  "code": "invalid_plan_change",
  "meta": "{\"Plan\": {\"ID\": \"planID\", \"Name\": \"planName\", \"CurrencySymbol\": \"currencySymbol\", \"AmountFormatted\": \"amountFormatted\", \"AnnualAmountFormatted\": \"annualMonthlyAmountFormatted\"}, \"Period\": period}"
}
Status Code: 400
{
  "shortMessage": "Invalid use of test card",
  "longMessage": "Test card cannot be used in production environment.",
  "code": "invalid_use_of_test_card"
}
Status Code: 400
{
  "shortMessage": "Missing payer email",
  "longMessage": "Payer email is required to perform this operation",
  "code": "missing_payer_email"
}
Status Code: 400
{
  "shortMessage": "Missing plan ID",
  "longMessage": "Plan ID is required to perform this operation",
  "code": "missing_plan_id"
}
Status Code: 409
{
  "shortMessage": "Payee not active",
  "longMessage": "Payee is not active",
  "code": "payee_not_active"
}
Status Code: 404
{
  "shortMessage": "Payee not found",
  "longMessage": "Payee not found",
  "code": "payee_not_found"
}
Status Code: 404
{
  "shortMessage": "Payer not found",
  "longMessage": "Payer not found",
  "code": "payer_not_found"
}
Status Code: 422
{
  "shortMessage": "Payment attempt failed",
  "longMessage": "Payment attempt failed<optionalReason>",
  "code": "payment_attempt_failed"
}
Status Code: 422
{
  "shortMessage": "Your card was declined",
  "longMessage": "The card was declined.",
  "code": "payment_attempt_failed_card_declined"
}
Status Code: 422
{
  "shortMessage": "Card expired",
  "longMessage": "The card has expired.",
  "code": "payment_attempt_failed_card_expired"
}
Status Code: 422
{
  "shortMessage": "Insufficient funds",
  "longMessage": "The card has insufficient funds.",
  "code": "payment_attempt_failed_card_insufficient_funds"
}
Status Code: 422
{
  "shortMessage": "Processing error",
  "longMessage": "There was a processing error with the payment method.",
  "code": "payment_attempt_failed_processing_error"
}
Status Code: 400
{
  "shortMessage": "Payment method is expired",
  "longMessage": "Payment method is expired",
  "code": "payment_source_expired"
}
Status Code: 409
{
  "shortMessage": "Payment source in use",
  "longMessage": "Payment source is in use, as you have active subscriptions. Please cancel those subscriptions before deleting the payment source.",
  "code": "payment_source_in_use"
}
Status Code: 404
{
  "shortMessage": "Payment source not found",
  "longMessage": "Payment source not found",
  "code": "payment_source_not_found"
}
Status Code: 404
{
  "shortMessage": "Plan not found",
  "longMessage": "Plan not found",
  "code": "plan_not_found"
}
Status Code: 404
{
  "shortMessage": "Subscription not found",
  "longMessage": "Subscription not found",
  "code": "subscription_not_found"
}
Status Code: 403
{
  "shortMessage": "operation not allowed",
  "longMessage": "This operation is not allowed on a satellite domain. Try again using the primary domain of your instance.",
  "code": "operation_not_allowed_on_satellite_domain"
}

SyncNonceAlreadyConsumed

SyncNonceAlreadyConsumed signifies an error when the nonce that was given during the sync flow is already consumed.

Status Code: 403
{
  "shortMessage": "sync nonce already consumed",
  "longMessage": "The given sync nonce has already been consumed and cannot be re-used.",
  "code": "sync_nonce_already_consumed"
}
Status Code: 422
{
  "shortMessage": "Identifications creation disabled by your enterprise account",
  "longMessage": "You cannot create identifications because your enterprise account does not allow it.",
  "code": "enterprise_sso_additional_identifications_disabled"
}
Status Code: 400
{
  "shortMessage": "Enterprise Connection email address domain mismatch",
  "longMessage": "The email address returned by the provider <received> does not match the domain of the enterprise connection <expected> that initiated the authentication.",
  "code": "enterprise_sso_email_address_domain_mismatch"
}
Status Code: 400
{
  "shortMessage": "Hosted domain mismatch",
  "longMessage": "The Enterprise Connection domain does not match the user's hosted domain from the OAuth provider.",
  "code": "enterprise_sso_hosted_domain_mismatch"
}
Status Code: 422
{
  "shortMessage": "No Enterprise Connection for this sign-in",
  "longMessage": "The current sign-in does not have a corresponding Enterprise Connection. Please check the domain of the provided email address.",
  "code": "enterprise_sso_sign_in_connection_missing"
}
Status Code: 422
{
  "shortMessage": "No Enterprise Connection for this sign-up",
  "longMessage": "The current sign-up does not have a corresponding Enterprise Connection. Please check the domain of the provided email address.",
  "code": "enterprise_sso_sign_up_connection_missing"
}
Status Code: 400
{
  "shortMessage": "Enterprise Connection user attribute missing",
  "longMessage": "This account does not have an associated '<attrName>' attribute. Contact your IdP administrator for resolution.",
  "code": "enterprise_sso_user_attribute_missing"
}
Status Code: 403
{
  "shortMessage": "not enabled",
  "longMessage": "This feature is not enabled on this instance",
  "code": "feature_not_enabled"
}
Status Code: 422
{
  "shortMessage": "dynamic client registration is not enabled",
  "longMessage": "Dynamic client registration is not enabled on this instance. Please enable it in the instance settings to use this feature",
  "code": "feature_requires_dynamic_oauth_client_registration"
}
Status Code: 422
{
  "shortMessage": "not an OAuth 2.0 edge access token storage",
  "longMessage": "You are using the legacy OAuth 2.0 provider. Please migrate to the new OAuth 2.0 edge access token storage to use this feature",
  "code": "feature_requires_oauth2_edge_access_token_storage"
}
Status Code: 422
{
  "shortMessage": "not an OIDC provider",
  "longMessage": "You are using the legacy OAuth 2.0 provider. Please migrate to the new OIDC compatible provider to use this feature",
  "code": "feature_requires_oidc_provider"
}

Forms

FormAtLeastOneItemInArrayRequired

FormAtLeastOneItemInArrayRequired signifies an error when at least one item in an array is required

Status Code: 422
{
  "shortMessage": "at least one item must be provided",
  "longMessage": "at least one item must be provided for `<param>`",
  "code": "form_param_missing",
  "meta": {
    "name": "param"
  }
}

FormDisabledParameterValue

FormDisabledParameterValue signifies an error when the given parameter has an invalid value because it is not enabled in the settings

Status Code: 400
{
  "shortMessage": "is disabled",
  "longMessage": "<value> is disabled. Please verify you're using the correct instance, or see our docs to learn how to enable this value.",
  "code": "form_param_value_disabled",
  "meta": {
    "name": "param"
  }
}

FormDuplicateParameter

FormDuplicateParameter signifies an error when a duplicate parameter is found in a form

Status Code: 422
{
  "shortMessage": "is duplicate",
  "longMessage": "<param> included multiple times. There should only be one.",
  "code": "form_param_duplicate",
  "meta": {
    "name": "param"
  }
}

FormIdentifierExists

FormIdentifierExists signifies an error when given identifier already exists

Status Code: 422
{
  "shortMessage": "",
  "code": "form_identifier_exists",
  "meta": {
    "name": "param"
  }
}

FormIdentifierNotFound

FormIdentifierNotFound signifies an error when a required identifier is not found

Status Code: 422
{
  "shortMessage": "",
  "code": "form_identifier_not_found",
  "meta": {
    "name": "param"
  }
}

FormIncorrectCode

FormIncorrectCode signifies an error when the given code is incorrect

Status Code: 422
{
  "shortMessage": "is incorrect",
  "longMessage": "Incorrect code",
  "code": "form_code_incorrect",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is incorrect",
  "longMessage": "Incorrect signature",
  "code": "form_incorrect_signature"
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> must be a valid email address.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "invalid email addresses",
  "longMessage": "The following email addresses are invalid: <emailAddresses>",
  "code": "form_param_format_invalid",
  "meta": {
    "emailaddresses": "invalidemailaddresses"
  }
}

FormInvalidEncodingParameterValue

FormInvalidEncodingParameterValue signifies an error when the given parameter has an invalid encoding

Status Code: 422
{
  "shortMessage": "invalid character encoding",
  "longMessage": "<param> contains invalid UTF-8 characters",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidParameterFormat

FormInvalidParameterFormat signifies an error when the given parameter has an invalid format

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidParameterValue

FormInvalidParameterValue signifies an error when the given parameter has an invalid value

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<value> does not match one of the allowed values for parameter <param>",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidParameterValueWithAllowed

FormInvalidParameterValueWithAllowed signifies an error when the given parameter has an invalid value. The difference with FormInvalidParameterValue is that this error also includes the allowed values

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<value> does not match the allowed values for parameter <param>. Allowed values: <allowedValues>",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidPasswordLengthTooLong

FormInvalidPasswordLengthTooLong signifies an error when the password is invalid because of its length

Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_length_too_long",
  "meta": {
    "name": "param"
  }
}

FormInvalidPasswordLengthTooShort

FormInvalidPasswordLengthTooShort signifies an error when the password is invalid because of its length

Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_length_too_short",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Passwords must contain at least one lowercase character.",
  "longMessage": "Passwords must contain at least one lowercase character.",
  "code": "form_password_no_lowercase",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Passwords must contain at least one number.",
  "longMessage": "Passwords must contain at least one number.",
  "code": "form_password_no_number",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_no_special_char",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Given password is not strong enough.",
  "longMessage": "Given password is not strong enough.",
  "code": "form_password_not_strong_enough"
}
Status Code: 422
{
  "shortMessage": "Passwords must contain at least one uppercase character.",
  "longMessage": "Passwords must contain at least one uppercase character.",
  "code": "form_password_no_uppercase",
  "meta": {
    "name": "param"
  }
}

FormInvalidPasswordSizeInBytesExceeded

FormInvalidPasswordSizeInBytesExceeded signifies that the size in bytes was exceeded. Note that the maximum character length constraint may fail to detect this case, if multi-byte characters are included in the password. For example, bcrypt limit https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.8.0:bcrypt/bcrypt.go;l=87

Status Code: 422
{
  "shortMessage": "Your password has exceeded the maximum number of bytes allowed, please shorten it or remove some special characters.",
  "longMessage": "Your password has exceeded the maximum number of bytes allowed, please shorten it or remove some special characters.",
  "code": "form_password_size_in_bytes_exceeded",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> must be a valid phone number according to E.164 international standard.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidTypeParameter

FormInvalidTypeParameter signifies an error when a form parameter has the wrong type

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "`<param>` must be a `<paramType>`.",
  "code": "form_param_type_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidUsernameCharacter

FormInvalidUsernameCharacter signifies an error when the given username does not match username regex

Status Code: 422
{
  "shortMessage": "",
  "code": "form_username_invalid_character",
  "meta": {
    "name": "param"
  }
}

FormInvalidUsernameLength

FormInvalidUsernameLength signifies an error when the given username does not have required length

Status Code: 422
{
  "shortMessage": "",
  "code": "form_username_invalid_length",
  "meta": {
    "name": "param"
  }
}

FormInvalidUsernameNeedsNonNumberCharCode

FormInvalidUsernameNeedsNonNumberCharCode signifies an error when the given username does not match username regex

Status Code: 422
{
  "shortMessage": "",
  "code": "form_username_needs_non_number_char",
  "meta": {
    "name": "param"
  }
}

FormInvalidWeb3WalletAddress

FormInvalidWeb3Wallet signifies an error when the given web3 wallet address is invalid

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> must be a valid web3 wallet address that starts with 0x and contains 40 hexadecimal characters.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}

FormDisabledParameterValue signifies an error when the legal consent value has not been filled

Status Code: 422
{
  "shortMessage": "legal not accepted",
  "longMessage": "Legal consent must be accepted in order to continue.",
  "code": "legal_not_accepted",
  "meta": {
    "name": "param"
  }
}

FormMaximumParametersExceeded

FormMaximumParametersExceeded signifies an error when more than 100 of the same param is included.

Status Code: 422
{
  "shortMessage": "",
  "longMessage": "<param> is included more than the maximum of 100 times.",
  "code": "form_param_duplicate",
  "meta": {
    "name": "param"
  }
}

FormMetadataInvalidType

FormMetadataInvalidType signifies an error when the given metadata is not a valid key-value object

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormMissingParameter

FormMissingParameter signifies an error when an expected form parameter is missing

Status Code: 422
{
  "shortMessage": "is missing",
  "longMessage": "<param> must be included.",
  "code": "form_param_missing",
  "meta": {
    "name": "param"
  }
}

FormMissingResource

FormMissingResource signifies an error when the form parameter is referring to a missing resource

Status Code: 422
{
  "shortMessage": "is missing",
  "longMessage": "The resource associated with the supplied <param> was not found.",
  "code": "form_resource_not_found",
  "meta": {
    "name": "param"
  }
}

FormNilParameter

FormNilParameter signifies an error when a nil parameter is found in a form

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_nil",
  "meta": {
    "name": "param"
  }
}

FormNilParameterWithCustomText

FormNilParameterWithCustomText signifies an error when a nil parameter is found in a form. This variant also accepts a custom text to be displayed.

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_nil",
  "meta": {
    "name": "param"
  }
}

FormParameterMaxLengthExceeded

FormParameterMaxLengthExceeded signifies an error when the given param value exceeds the maximum allowed length

Status Code: 422
{
  "shortMessage": "exceeds maximum length",
  "longMessage": "<parameter> should not exceed %d characters.",
  "code": "form_param_max_length_exceeded",
  "meta": {
    "name": "param"
  }
}

FormParameterNotAllowedConditionally

FormParameterNotAllowedConditionally signifies an error when parameter is not allowed based on condition

Status Code: 422
{
  "shortMessage": "is not allowed",
  "longMessage": "`<param>` isn't allowed when `<leftCondition>` is <rightCondition>.",
  "code": "form_conditional_param_disallowed",
  "meta": {
    "name": "param"
  }
}

FormParameterSizeTooLarge

FormParameterSizeTooLarge signifies an error when a parameter exceeds the max allowed size

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_exceeds_allowed_size",
  "meta": {
    "name": "param"
  }
}

FormPasswordIncorrect

FormPasswordIncorrect signifies an error when given password is incorrect

Status Code: 422
{
  "shortMessage": "Password is incorrect. Try again, or use another method.",
  "longMessage": "Password is incorrect. Try again, or use another method.",
  "code": "form_password_incorrect",
  "meta": {
    "name": "param"
  }
}

FormPasswordValidationFailed

FormPasswordValidationFailed signifies a generic error when the password validation failed

Status Code: 422
{
  "shortMessage": "Incorrect password. Please try again.",
  "longMessage": "Incorrect password. Please try again.",
  "code": "form_password_validation_failed",
  "meta": {
    "name": "param"
  }
}

FormPwnedPassword

FormPwnedPassword signifies an error when the chosen password has been found in the pwned list

Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_pwned",
  "meta": {
    "name": "param"
  }
}

FormUnknownParameter

FormUnknownParameter signifies an error when an unexpected parameter is found in a form

Status Code: 422
{
  "shortMessage": "is unknown",
  "longMessage": "<param> is not a valid parameter for this request.",
  "code": "form_param_unknown",
  "meta": {
    "name": "param"
  }
}

FormValidationFailed

FormValidationFailed converts validator.ValidationErrors to Error.

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<sanitizedField> is invalid",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "sanitizedfield"
  }
}
Status Code: 401
{
  "shortMessage": "CAPTCHA verification is required",
  "longMessage": "CAPTCHA verification is required",
  "code": "requires_captcha"
}
Status Code: 401
{
  "shortMessage": "device attestation challenge client mismatch",
  "longMessage": "The device attestation challenge provided is not valid for the client.",
  "code": "device_attestation_challenge_client_mismatch"
}
Status Code: 401
{
  "shortMessage": "device attestation is misconfigured",
  "longMessage": "Device attestation is misconfigured for this instance.",
  "code": "device_attestation_misconfigured"
}
Status Code: 401
{
  "shortMessage": "device attestation not configured",
  "longMessage": "Device attestation is not configured for this instance.",
  "code": "device_attestation_not_configured"
}
Status Code: 401
{
  "shortMessage": "unsupported native client platform",
  "longMessage": "Device attestation is not supported for the client platform.",
  "code": "device_attestation_unsupported_platform"
}
Status Code: 401
{
  "shortMessage": "device attestation verification failed",
  "longMessage": "Failed to verify the provided device attestation.",
  "code": "device_attestation_verification_failed"
}
Status Code: 403
{
  "shortMessage": "Action blocked",
  "longMessage": "This action was detected as suspicious and has been blocked. If you believe this was a mistake, please contact support.",
  "code": "action_blocked"
}
Status Code:
{
  "shortMessage": "Device blocked",
  "longMessage": "This device was detected as suspicious and has been blocked. It will no longer be able to perform actions. If you believe this was by mistake, please contact support.",
  "code": "device_blocked"
}
Status Code: 400
{
  "shortMessage": "Unusual activity was detected",
  "longMessage": "Unusual activity was detected. Please try again later or contact our support if you continue to experience issues.",
  "code": "captcha_invalid"
}
Status Code: 401
{
  "shortMessage": "invalid device attestation assertion",
  "longMessage": "The device attestation assertion provided is invalid.",
  "code": "invalid_device_attestation_assertion"
}
Status Code: 401
{
  "shortMessage": "invalid device attestation challenge",
  "longMessage": "The device attestation challenge provided is either invalid or has expired.",
  "code": "invalid_device_attestation_challenge"
}
Status Code: 401
{
  "shortMessage": "assertion required",
  "longMessage": "An assertion is required to verify your device.",
  "code": "requires_assertion"
}
Status Code: 401
{
  "shortMessage": "Device attestation is required",
  "longMessage": "A valid device attestation could not be found for the client.",
  "code": "requires_device_attestation"
}
Status Code: 400
{
  "shortMessage": "Google One Tap token is invalid",
  "longMessage": "The provided Google One Tap token is invalid. Make sure you're using a valid token generated by Google.",
  "code": "google_one_tap_token_invalid"
}

Identifications

IdentificationNotFound

IdentificationNotFound signifies an error when comm is not found

Status Code: 404
{
  "shortMessage": "Resource not found",
  "longMessage": "Resource not found",
  "code": "resource_not_found"
}
Status Code: 404
{
  "shortMessage": "Identification not found",
  "longMessage": "No primary identification was found for user <userID>",
  "code": "primary_identification_not_found"
}
Status Code: 400
{
  "shortMessage": "too many unverified contacts",
  "longMessage": "There are too many unverified contacts for this user.",
  "code": "too_many_unverified_identifications"
}
Status Code: 404
{
  "shortMessage": "Image not found",
  "longMessage": "Image not found",
  "code": "image_not_found"
}

RequestWithoutImage

RequestWithoutImage signifies an error when no image was present in the request.

Status Code: 400
{
  "shortMessage": "Image file missing",
  "longMessage": "There was no image file present in the request",
  "code": "form_param_missing"
}

Instances

InstanceTypeInvalid

InstanceTypeInvalid signifies an error when a request cannot be applied to the given instance

Status Code: 400
{
  "shortMessage": "This request isn't valid for this instance type.",
  "longMessage": "This request isn't valid for this instance type.",
  "code": "instance_type_invalid"
}
Status Code: 400
{
  "shortMessage": "Bad request",
  "longMessage": "Bad request",
  "code": "bad_request"
}
Status Code: 400
{
  "shortMessage": "",
  "code": "bad_request"
}

Unexpected

Unexpected is used for all unexpected errors

Status Code: 500
{
  "shortMessage": "Oops, an unexpected error occurred",
  "longMessage": "There was an internal error on our servers. We've been notified and are working on fixing it.",
  "code": "internal_clerk_error"
}

Invitations

InvitationAccountAlreadyExists

InvitationAccountAlreadyExists denotes an error when there is an existing user identification with the same email as the invitation.

Status Code: 400
{
  "shortMessage": "account exists",
  "longMessage": "An account already exists for this invitation. Sign in instead.",
  "code": "invitation_account_exists"
}

InvitationAlreadyAccepted

InvitationAlreadyAccepted denotes an error when someone tries to use an invitation which is already accepted.

Status Code: 400
{
  "shortMessage": "Invitation is already accepted, try signing in instead.",
  "longMessage": "Invitation is already accepted, try signing in instead.",
  "code": "invitation_already_accepted"
}
Status Code: 400
{
  "shortMessage": "identification not found",
  "longMessage": "This invitation refers to a non-existing identification.",
  "code": "invitation_account_not_exists"
}

InvitationNotFound

InvitationNotFound denotes an error when there is no invitation with the given id

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "No invitation was found with id <invitationID>.",
  "code": "resource_not_found"
}

RevokedInvitation

RevokedInvitation denotes an error when the given invitation token does not correspond to any invitations, which means that the invitation has been removed.

Status Code: 400
{
  "shortMessage": "The invitation was revoked.",
  "longMessage": "The invitation was revoked.",
  "code": "revoked_invitation"
}

Jwt Templates

JWTTemplateNotFound

JWTTemplateNotFound signifies an error when a JWT template was not found by the provided attribute

Status Code: 404
{
  "shortMessage": "JWT template not found",
  "longMessage": "No JWT template exists with <attribute>: <val>",
  "code": "resource_not_found"
}
Status Code: 503
{
  "shortMessage": "System under maintenance",
  "longMessage": "We are currently undergoing maintenance and only essential operations are permitted. We will be back shortly.",
  "code": "maintenance_mode"
}

Oauth

ExternalAccountEmailAddressVerificationRequired

ExternalAccountEmailAddressVerificationRequired signifies an error when the external account requires email address verification

Status Code: 400
{
  "shortMessage": "Email address verification required",
  "longMessage": "Your associated email address is required to be verified, because it was initially created as unverified.",
  "code": "external_account_email_address_verification_required"
}
Status Code: 400
{
  "shortMessage": "Missing refresh token",
  "longMessage": "We cannot refresh your OAuth access token because the server didn't provide a refresh token. Please re-connect your account.",
  "code": "external_account_missing_refresh_token"
}

ExternalAccountNotFound

ExternalAccountNotFound signifies an error when the external account of the oauth callback is not found

Status Code: 404
{
  "shortMessage": "Invalid external account",
  "longMessage": "The External Account was not found.",
  "code": "external_account_not_found"
}

InvalidOAuthCallback

InvalidOAuthCallback signifies an error when the form of OAuth callback is invalid

Status Code: 400
{
  "shortMessage": "Invalid OAuth callback",
  "longMessage": "invalid form for oauth_callback",
  "code": "oauth_callback_invalid"
}

MisconfiguredOAuthProvider

MisconfiguredOAuthProvider signifies an error when there is a misconfiguration for an OAuth provider

Status Code: 400
{
  "shortMessage": "Misconfigured OAuth provider",
  "longMessage": "Misconfigured OAuth provider. Please make sure you have set it correctly",
  "code": "misconfigured_oauth_provider"
}

NonAuthenticatableOauthProvider

NonAuthenticatableOauthProvider signifies an error when an oauth flow step is attempted for a provider that is not enabled for authentication.

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "%v OAuth is not supported for authentication. Please contact us if you think this error should not appear.",
  "code": "oauth_non_authenticatable_provider"
}
Status Code: 403
{
  "shortMessage": "",
  "longMessage": "You did not grant access to your <providerName> account",
  "code": "oauth_access_denied"
}

OAuthAccountAlreadyConnected

OAuthAccountAlreadyConnected signifies an error when an OAuth account if already connected for a specific provider

Status Code: 400
{
  "shortMessage": "Already connected",
  "longMessage": "Another account is already connected for this particular provider (<providerTitle>)",
  "code": "oauth_account_already_connected"
}

OAuthConfigMissing

OAuthConfigMissing signifies an error when an application does not have SSO credentials set, for a particular SSO provider.

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "The application does not have <provider> OAuth keys set in its settings.",
  "code": "oauth_config_missing"
}
Status Code: 400
{
  "shortMessage": "Fetch user error",
  "longMessage": "Fetch user error",
  "code": "oauth_fetch_user_error"
}

OAuthIdentificationClaimed

OAuthIdentificationClaimed signifies an error when the requested oauth identification is already claimed by another user

Status Code: 400
{
  "shortMessage": "Identification claimed by another user",
  "longMessage": "The email address associated with this OAuth account is already claimed by another user.",
  "code": "oauth_identification_claimed"
}
Status Code: 400
{
  "shortMessage": "",
  "longMessage": "Your <providerName> account configuration is invalid. Make sure you register this endpoint in the list of allowed callback URLs.",
  "code": "redirect_uri_mismatch"
}
Status Code: 400
{
  "shortMessage": "malformed redirect uri provided",
  "longMessage": "malformed redirect uri provided",
  "code": "redirect_uri_mismatch"
}
Status Code: 422
{
  "shortMessage": "Missing OAuth access token",
  "longMessage": "OAuth access token is missing",
  "code": "oauth_missing_access_token"
}
Status Code: 422
{
  "shortMessage": "Cannot refresh OAuth access token",
  "longMessage": "The current access token has expired and we cannot refresh it, because the authorization server hasn't provided us with a refresh token",
  "code": "oauth_missing_refresh_token"
}
Status Code: 400
{
  "shortMessage": "",
  "longMessage": "Single-sign on with <providerTitle> OAuth provider is not enabled in the instance settings.",
  "code": "oauth_provider_not_enabled"
}

OAuthSharedCredentialsNotSupported

OAuthSharedCredentialsNotSupported signifies an error when an OAuth provider uses our shared credentials, but those are not supported anymore.

Status Code: 400
{
  "shortMessage": "Shared credentials not supported",
  "longMessage": "Shared credentials are no longer supported for this provider. Please update via the Clerk Dashboard.",
  "code": "oauth_shared_credentials_not_supported"
}
Status Code: 400
{
  "shortMessage": "Token exchange error",
  "longMessage": "Token exchange error",
  "code": "oauth_token_exchange_error"
}

UnsupportedOauthProvider

UnsupportedOauthProvider signifies an error when an instance tries to enable an OAuth external provider which is not supported.

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "%v OAuth is not supported. Please contact us if you think this error should not appear.",
  "code": "oauth_unsupported_provider"
}

Oauth2 Idp

OAuthFetchUserInfo

OAuthFetchUserInfo signifies an error when user info cannot be retrieved with the access token

Status Code: 401
{
  "shortMessage": "unable to fetch user info",
  "longMessage": "Unable to fetch user info. Check if access token is present and valid.",
  "code": "oauth_fetch_user_error"
}
Status Code: 400
{
  "shortMessage": "duplicate redirect URI",
  "longMessage": "the redirect URI already exists",
  "code": "duplicate_record"
}

Organizations

AlreadyAMemberOfOrganization

400 - User with given identifier is already a member of the organization and cannot be added again

Status Code: 400
{
  "shortMessage": "already a member",
  "longMessage": "<user> is already a member of the organization.",
  "code": "already_a_member_in_organization"
}
Status Code: 403
{
  "shortMessage": "missing permission",
  "longMessage": "Current user is missing an organization permission.",
  "code": "missing_organization_permission",
  "meta": {
    "permissions": "permissions"
  }
}

NotAMemberInOrganization

403 - Only for organization members Deprecated: This error reveals the existence of an organization to an unauthorized user. Use OrganizationNotFoundOrUnauthorized instead, and ensure other pathways that error when the organization isn't found also use OrganizationNotFoundOrUnauthorized

Status Code: 403
{
  "shortMessage": "not a member",
  "longMessage": "Current user is not a member of the organization. Only organization members can perform this action.",
  "code": "not_a_member_in_organization"
}
Status Code: 403
{
  "shortMessage": "admin delete not enabled",
  "longMessage": "Deletion by admin is not enabled for this organization.",
  "code": "organization_admin_delete_not_enabled"
}
Status Code: 422
{
  "shortMessage": "organizaton domain already exists",
  "longMessage": "This domain is already used by another organization.",
  "code": "organization_domain_already_exists",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "blocked email domain",
  "longMessage": "This is a blocked email provider domain. Please use a different one.",
  "code": "organization_domain_blocked",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "common email domain",
  "longMessage": "This is a common email provider domain. Please use a different one.",
  "code": "organization_domain_common",
  "meta": {
    "name": "param"
  }
}
Status Code: 403
{
  "shortMessage": "organization enrollment mode not enabled",
  "longMessage": "Enrollment mode <enrollmentMode> is not enabled for this instances's organizations.",
  "code": "organization_domain_enrollment_mode_not_enabled"
}
Status Code: 422
{
  "shortMessage": "Organization domain mismatch",
  "longMessage": "The provided email address doesn't match the organization domain name.",
  "code": "organization_domain_mismatch",
  "meta": {
    "name": "param"
  }
}
Status Code: 403
{
  "shortMessage": "organization domains quota exceeded",
  "longMessage": "You have reached your limit of %d domains per organization.",
  "code": "organization_domain_quota_exceeded"
}
Status Code: 400
{
  "shortMessage": "invitation has already been accepted",
  "longMessage": "This invitation has already been accepted. Sign in instead.",
  "code": "organization_invitation_already_accepted"
}
Status Code: 400
{
  "shortMessage": "email address already exists",
  "longMessage": "The email address in this invitation already exists. If it belongs to you, try signing in instead.",
  "code": "organization_invitation_identification_already_exists"
}
Status Code: 400
{
  "shortMessage": "identification not found",
  "longMessage": "User not found. If you don't have an account, sign up first to accept this invitation.",
  "code": "organization_invitation_identification_not_exist"
}

OrganizationInvitationNotFound

404 - Invitation not found.

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "No invitation found with id <invitationID>.",
  "code": "organization_invitation_not_found"
}

OrganizationInvitationNotPending

404 - Invitation is not pending.

Status Code: 404
{
  "shortMessage": "not pending",
  "longMessage": "The organization invitation is not in the 'pending' status.",
  "code": "organization_invitation_not_pending"
}
Status Code: 400
{
  "shortMessage": "organization invitation not unique",
  "longMessage": "Organizations cannot have duplicate pending invitations for an email address.",
  "code": "organization_invitation_not_unique"
}
Status Code: 400
{
  "shortMessage": "invitation has been revoked",
  "longMessage": "This invitation has been revoked and cannot be used anymore.",
  "code": "organization_invitation_revoked_code"
}
Status Code: 400
{
  "shortMessage": "organization invitation to deleted organization",
  "longMessage": "This invitation refers to an organization that has been deleted.",
  "code": "organization_invitation_to_deleted_organization"
}
Status Code: 403
{
  "shortMessage": "cannot remove enterprise connection organization membership",
  "longMessage": "Cannot remove an organization membership that is tied to an enterprise connection.",
  "code": "organization_membership_enterprise_connection_cannot_remove"
}
Status Code: 403
{
  "shortMessage": "organization membership quota exceeded",
  "longMessage": "You have reached the limit of %d organization memberships allowed by the subscription plan. Please upgrade your subscription to add more.",
  "code": "organization_membership_plan_quota_exceeded"
}
Status Code: 403
{
  "shortMessage": "organization membership quota exceeded",
  "longMessage": "You have reached your limit of %d organization memberships, including outstanding invitations.",
  "code": "organization_membership_quota_exceeded"
}
Status Code: 403
{
  "shortMessage": "organization membership quota exceeded for sso per org",
  "longMessage": "The organization you are trying to join is full. Please contact support.",
  "code": "organization_membership_quota_exceeded_for_sso"
}
Status Code: 422
{
  "shortMessage": "invalid organization name",
  "longMessage": "The organization name %q is invalid: <name>",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "name"
  }
}
Status Code: 403
{
  "shortMessage": "access denied",
  "longMessage": "The organizations feature is not enabled for this instance. You can enable it at https://dashboard.clerk.com.",
  "code": "organization_not_enabled_in_instance"
}

OrganizationNotFound

404 - Organization not found WARNING: This is safe to use for endpoints where the caller is authorized to be aware of every organization. But if the endpoint errors if the caller is not authorized on the organization, do not use this, because it leaks the existence of the organization! Use OrganizationNotFoundOrUnauthorized instead.

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Given organization not found.",
  "code": "resource_not_found"
}

OrganizationNotFoundOrUnauthorized

404 - Used for any case

Status Code: 404
{
  "shortMessage": "not found or unauthorized",
  "longMessage": "Given organization not found, or you don't have permission to access the organization",
  "code": "organization_not_found_or_unauthorized"
}
Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Organization role not found",
  "code": "resource_not_found",
  "meta": {
    "name": "paramname"
  }
}
Status Code: 400
{
  "shortMessage": "suggestion has already been accepted",
  "longMessage": "This organization suggestion has already been accepted.",
  "code": "organization_suggestion_already_accepted"
}
Status Code: 403
{
  "shortMessage": "organization has limited memberships",
  "longMessage": "This feature is not supported because organization membership is limited. You can remove the limit by enabling unlimited memberships.",
  "code": "organization_unlimited_membership_required"
}
Status Code: 403
{
  "shortMessage": "organization has limited memberships",
  "longMessage": "This feature is not supported because organization membership is limited. You can remove the limit by upgrading your subscription plan.",
  "code": "organization_unlimited_membership_required"
}
Status Code: 400
{
  "shortMessage": "authentication failed",
  "longMessage": "Passkey authentication failed",
  "code": "passkey_authentication_failure"
}
Status Code: 422
{
  "shortMessage": "passkey identification not verified",
  "longMessage": "Passkey identification not verified. Registration is incomplete.",
  "code": "passkey_identification_not_verified"
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "Invalid passkey public key credential",
  "code": "passkey_invalid_public_key_credential",
  "meta": {
    "name": "param"
  }
}
Status Code: 400
{
  "shortMessage": "invalid verification",
  "longMessage": "Passkey verification contains invalid nonce",
  "code": "passkey_invalid_verification"
}
Status Code: 404
{
  "shortMessage": "not registered",
  "longMessage": "Passkey is not registered.",
  "code": "passkey_not_registered"
}

Redirect Urls

InvalidRedirectURL

InvalidRedirectURL signifies an error when a RedirectURL is in invalid format

Status Code: 422
{
  "shortMessage": "Redirect url invalid",
  "longMessage": "The provided redirect url is not in a valid format",
  "code": "invalid_redirect_url"
}
Status Code: 422
{
  "shortMessage": "Redirect url does not belong to your domain",
  "longMessage": "The provided redirect URL must belong to your instance's domain",
  "code": "redirect_url_domain_mismatch"
}

RedirectURLMismatch

RedirectURLMismatch signifies an error when the RedirectURL that was passed during an OAuth flow is not included in the redirect_urls whitelist for that instance.

Status Code: 400
{
  "shortMessage": "Redirect url mismatch",
  "longMessage": "The current redirect url passed in the sign in or sign up request does not match an authorized redirect URI for this instance. Review authorized redirect urls for your instance. <val>",
  "code": "resource_missmatch"
}
Status Code: 400
{
  "shortMessage": "",
  "longMessage": "<value> does not match one of the allowed values for parameter <param>",
  "code": "invalid_query_parameter_value"
}

InvalidRequestBody

InvalidRequestBody signifies an error when the body of the request does not conform to the expected format

Status Code: 400
{
  "shortMessage": "Request body invalid",
  "longMessage": "The request body is invalid. Please consult the API documentation for more information.",
  "code": "request_body_invalid"
}

MalformedRequestParameters

MalformedRequestParameters signifies an error when the request parameters are malformed and result in parsing errors

Status Code: 400
{
  "shortMessage": "Malformed request parameters",
  "longMessage": "The request parameters are malformed and could not be parsed",
  "code": "malformed_request_parameters"
}

MissingQueryParameter

MissingQueryParameter denotes that the required query parameter, param, was not provided by the request.

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "The query parameter '<param>' is missing from the request. Please consult the API documentation for more information.",
  "code": "missing_query_parameter"
}

OriginHeaderMissing

OriginHeaderMissing

Status Code: 400
{
  "shortMessage": "Origin header missing",
  "longMessage": "This request requires an Origin header to be set, but it is missing",
  "code": "origin_missing"
}
Status Code: 401
{
  "shortMessage": "invalid secret key",
  "longMessage": "The secret key given with this proxy request is invalid.",
  "code": "proxy_request_invalid_secret_key"
}
Status Code: 400
{
  "shortMessage": "missing secret key",
  "longMessage": "When using a proxy, it's required to also pass the instance secret key in the Clerk-Secret-Key header.",
  "code": "proxy_request_missing_secret_key"
}

UnsupportedContentType

UnsupportedContentType signifies an error when provided content type is unsupported

Status Code: 415
{
  "shortMessage": "Content-Type is unsupported",
  "longMessage": "Content-Type <actual> is unsupported. You should use <expected> instead.",
  "code": "unsupported_content_type"
}
Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "No active SAML Connection found with id <connectionID>.",
  "code": "saml_connection_active_not_found"
}
Status Code: 400
{
  "shortMessage": "Email address domain mismatch",
  "longMessage": "The email address domain of the provider's account does not match the domain of the connection.",
  "code": "saml_email_address_domain_mismatch"
}
Status Code: 422
{
  "shortMessage": "email address domain is used for SAML SSO",
  "longMessage": "You can't use this email address, as SAML SSO is enabled for the specific domain.",
  "code": "saml_email_address_domain_reserved"
}
Status Code: 400
{
  "shortMessage": "Email address mismatch",
  "longMessage": "The provided email address differs from the one in the SAML response.",
  "code": "saml_email_address_domain_mismatch"
}
Status Code: 422
{
  "shortMessage": "SAML SSO not enabled",
  "longMessage": "SAML SSO is not enabled for this email address.",
  "code": "saml_connection_not_found",
  "meta": {
    "name": "param"
  }
}
Status Code: 401
{
  "shortMessage": "Invalid SAML response",
  "longMessage": "The SAML response is invalid.<optionalReason>",
  "code": "saml_response_invalid"
}
Status Code: 400
{
  "shortMessage": "RelayState parameter missing",
  "longMessage": "The RelayState parameter is missing from the SAML Response. Note that RelayState is not required if you are using the IdP-initiated flow. See https://clerk.com/docs/authentication/saml/authentication-flows",
  "code": "saml_response_relaystate_missing"
}
Status Code: 400
{
  "shortMessage": "SAML SSO user attribute missing",
  "longMessage": "This account does not have an associated '<attrName>' attribute. Contact your IdP administrator for resolution.",
  "code": "saml_user_attribute_missing"
}
Status Code: 409
{
  "shortMessage": "unable to create session",
  "longMessage": "Unable to create new session when an impersonation session is present. Please sign out first.",
  "code": "session_creation_not_allowed"
}
Status Code: 401
{
  "shortMessage": "account deprovisioned",
  "longMessage": "Your account is deprovisioned",
  "code": "deprovisioned"
}

InvalidActionForSession

InvalidActionForSession signifies an error occurred when user tries to perform invalid action on a session

Status Code: 400
{
  "shortMessage": "Invalid action for user session",
  "longMessage": "Unable to <action> session <sessionID>",
  "code": "invalid_action_for_session"
}
Status Code: 400
{
  "shortMessage": "Invalid action for session reverification",
  "longMessage": "We were unable to <action> for this session, as it's not ready for <resolution>.",
  "code": "invalid_action_for_session_reverification"
}

SessionNotFound

SessionNotFound signifies an error when no session with given sessionID was found

Status Code: 404
{
  "shortMessage": "Session not found",
  "longMessage": "No session was found with id <sessionID>",
  "code": "resource_not_found"
}
Status Code: 400
{
  "shortMessage": "is missing",
  "longMessage": "You need to start a new session verification flow first",
  "code": "session_reverification_missing"
}
Status Code: 403
{
  "shortMessage": "Reverification required",
  "longMessage": "You need to provide additional verification to perform this operation",
  "code": "session_reverification_required"
}

UnauthorizedActionForSession

UnauthorizedActionForSession signifies an error occurred when the requestor is not authorized to perform the requested action to the respective session.

Status Code: 401
{
  "shortMessage": "Unauthorized action for session",
  "longMessage": "Not authorized to perform requested action on session <sessionID>",
  "code": "action_for_session_not_authorized"
}

Sign In

AccountTransferInvalid

AccountTransferInvalid signifies an error when no account was found to transfer

Status Code: 400
{
  "shortMessage": "Invalid account transfer",
  "longMessage": "There is no account to transfer",
  "code": "account_transfer_invalid"
}

AlreadySignedIn

AlreadySignedIn signifies an error when given session ID is already signed in

Status Code: 400
{
  "shortMessage": "You're already signed in",
  "longMessage": "You're already signed in",
  "code": "identifier_already_signed_in",
  "meta": "session"
}

IdentificationClaimed

IdentificationClaimed signifies an error when the requested identification is already claimed by another user

Status Code: 400
{
  "shortMessage": "Identification claimed by another user",
  "longMessage": "One or more identifiers on this sign up have since been connected to a different User. Please sign up again.",
  "code": "identification_claimed"
}

InvalidClientStateForAction

InvalidClientStateForAction signifies an error when trying to perform an invalid action for the current client state

Status Code: 400
{
  "shortMessage": "Invalid action",
  "longMessage": "We were unable to complete <action> for this Client. <resolution>",
  "code": "client_state_invalid"
}

InvalidStrategyForUser

InvalidStrategyForUser signifies an error when the supplied verification strategy is not valid for the account

Status Code: 400
{
  "shortMessage": "Invalid verification strategy",
  "longMessage": "The verification strategy is not valid for this account",
  "code": "strategy_for_user_invalid"
}

MutationOnOlderSignInNotAllowed

MutationOnOlderSignInNotAllowed signifies an error when trying to mutate an older sign in

Status Code: 403
{
  "shortMessage": "Update operations are not allowed on older sign ins",
  "longMessage": "Update operations are not allowed on older sign ins",
  "code": "resource_forbidden"
}
Status Code: 400
{
  "shortMessage": "no second factors",
  "longMessage": "No second factors were found for strategy <strategy>.",
  "code": "no_second_factors"
}
Status Code: 403
{
  "shortMessage": "email link sign in cannot be completed",
  "longMessage": "Email link sign in cannot be completed because it originates from a different client",
  "code": "sign_in_email_link_not_same_client"
}
Status Code: 400
{
  "shortMessage": "identification or user deleted",
  "longMessage": "Either the user or the selected identification were deleted. Please start over.",
  "code": "sign_in_identification_or_user_deleted"
}
Status Code: 404
{
  "shortMessage": "no identification for user",
  "longMessage": "The given token doesn't have an associated identification for the user who created it.",
  "code": "sign_in_no_identification_for_user"
}

SignInNotFound

UserNotFound signifies an error when no user is found with userID

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "No sign in was found with id <signInID>",
  "code": "resource_not_found"
}

SingleModeSessionExists

SingleModeSessionExists signifies an error when session already exists but we are in single session mode

Status Code: 400
{
  "shortMessage": "Session already exists",
  "longMessage": "You're already signed in.",
  "code": "session_exists"
}
Status Code: 400
{
  "shortMessage": "sign in token has already been used",
  "longMessage": "This sign in token has already been used. Each token can only be used once.",
  "code": "sign_in_token_already_used_code"
}
Status Code: 400
{
  "shortMessage": "not in sign in",
  "longMessage": "Sign in tokens can only be used during sign in.",
  "code": "sign_in_token_not_in_sign_in_code"
}
Status Code: 400
{
  "shortMessage": "sign in token cannot be used",
  "longMessage": "This sign in token cannot be used anymore. Please request a new one.",
  "code": "sign_in_token_cannot_be_used_code"
}
Status Code: 400
{
  "shortMessage": "sign in token has been revoked",
  "longMessage": "This sign in token has been revoked and cannot be used anymore.",
  "code": "sign_in_token_revoked_code"
}
Status Code: 400
{
  "shortMessage": "Error loading CAPTCHA",
  "longMessage": "The CAPTCHA failed to load. This may be due to an unsupported browser or a browser extension. Please try a different browser or disabling extensions. If this issue persists, please contact support.",
  "code": "captcha_invalid"
}
Status Code: 400
{
  "shortMessage": "Sign up unsuccessful due to failed security validations.",
  "longMessage": "Sign up unsuccessful due to failed security validations. Please try using a different browser or disabling browser extensions. If issues persist, contact support for assistance.",
  "code": "captcha_invalid"
}
Status Code: 400
{
  "shortMessage": "Sign up unsuccessful due to failed security validations.",
  "longMessage": "Sign up unsuccessful due to failed security validations. Please refresh the page to try again or reach out to support for more assistance.",
  "code": "captcha_missing_token"
}
Status Code: 400
{
  "shortMessage": "CAPTCHA not enabled",
  "longMessage": "You attempted to complete a CAPTCHA, but they are not enabled. If this issue persists, please contact support.",
  "code": "captcha_not_enabled"
}
Status Code: 403
{
  "shortMessage": "email link sign up cannot be completed",
  "longMessage": "Email link sign up cannot be completed because it originates from a different client",
  "code": "sign_up_email_link_not_same_client"
}
Status Code: 403
{
  "shortMessage": "Sign up forbidden",
  "longMessage": "Access to this sign up is forbidden",
  "code": "resource_forbidden"
}
Status Code: 403
{
  "shortMessage": "Sign-ups restricted",
  "longMessage": "New sign-ups are currently restricted.",
  "code": "sign_up_mode_restricted"
}
Status Code: 403
{
  "shortMessage": "Sign-ups restricted with waitlist",
  "longMessage": "Sign-ups are currently unavailable. Join the waitlist, and you will be notified when access becomes available.",
  "code": "sign_up_restricted_waitlist"
}

SignUpNotFound

SignUpNotFound returns an API error where no sign up could be found with the requested ID.

Status Code: 404
{
  "shortMessage": "Sign up not found",
  "longMessage": "No sign up was found with id <id>",
  "code": "resource_not_found"
}

Sms

DevMonthlySMSLimitExceeded

DevMonthlySMSLimitExceeded signifies an error when an SMS sending attempt is made while the development limit has already been reached

Status Code: 400
{
  "shortMessage": "Development monthly SMS limit exceeded",
  "longMessage": "Operation cannot be completed because the monthly limit for SMS messages in development (%d) has been reached.",
  "code": "dev_monthly_sms_limit_exceeded",
  "meta": "{\"limit\"}"
}
Status Code: 400
{
  "shortMessage": "Sending SMS failed",
  "longMessage": "Sending SMS failed. Please contact support or try again later.",
  "code": "sms_send_error"
}
Status Code: 400
{
  "shortMessage": "ticket has expired",
  "longMessage": "This ticket has expired and cannot be used anymore.",
  "code": "ticket_expired_code"
}
Status Code: 400
{
  "shortMessage": "ticket is invalid",
  "longMessage": "This ticket is invalid. Make sure you're using a valid ticket generated by Clerk.",
  "code": "ticket_invalid_code"
}
Status Code: 422
{
  "shortMessage": "invalid TOTP secret",
  "longMessage": "The TOTP secret is invalid, please provide a valid one base32 encoded",
  "code": "invalid_totp_secret_code"
}

TOTPAlreadyEnabled

TOTPAlreadyEnabled signifies an error when a user attempts to enable TOTP, but it's already enabled.

Status Code: 400
{
  "shortMessage": "TOTP already enabled",
  "longMessage": "TOTP is already enabled on your account",
  "code": "totp_already_enabled"
}
Status Code: 422
{
  "shortMessage": "Invalid URL scheme",
  "longMessage": "Please provide a URL with one of the following schemes: <schemes>",
  "code": "invalid_url_scheme",
  "meta": {
    "name": "paramname"
  }
}
Status Code: 403
{
  "shortMessage": "Account locked",
  "longMessage": "Your account is locked. You will be able to try again in <timeRemaining>. For more information, please contact <support>.",
  "code": "user_locked"
}
Status Code: 403
{
  "shortMessage": "Account locked",
  "longMessage": "Your account is locked. For more information, please contact <support>.",
  "code": "user_locked"
}
Status Code: 403
{
  "shortMessage": "forbidden",
  "longMessage": "Resource forbidden",
  "code": "resource_forbidden"
}
Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Resource not found",
  "code": "resource_not_found"
}
Status Code: 400
{
  "shortMessage": "no password set",
  "longMessage": "This user does not have a password set for their account",
  "code": "no_password_set"
}
Status Code: 400
{
  "shortMessage": "password required",
  "longMessage": "Settings for this instance require a password to be set. Cannot remove the user's password.",
  "code": "password_required"
}
Status Code: 403
{
  "shortMessage": "deprecated feature",
  "longMessage": "Password is not a valid parameter and can only be updated via /v1/me/change_password",
  "code": "updating_user_password_deprecated"
}

UserBanned

UserBanned signifies an error when a user is banned

Status Code: 403
{
  "shortMessage": "User banned",
  "longMessage": "You have been banned. If you think this was by mistake, please contact support.",
  "code": "user_banned"
}
Status Code: 403
{
  "shortMessage": "create organization not enabled",
  "longMessage": "Organization creation is not enabled for this user",
  "code": "user_create_organization_not_enabled"
}
Status Code: 403
{
  "shortMessage": "delete self not enabled",
  "longMessage": "Self deletion is not enabled for this user",
  "code": "user_delete_self_not_enabled"
}

UserNotFound

UserNotFound signifies an error when no user is found with userID

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "No user was found with id <userID>",
  "code": "resource_not_found"
}
Status Code: 403
{
  "shortMessage": "user quota exceeded",
  "longMessage": "You have reached your limit of %d users. <maxAllowed>",
  "code": "user_quota_exceeded"
}

Verification

VerificationAlreadyVerified

VerificationAlreadyVerified signifies an error when verification has already been verified

Status Code: 400
{
  "shortMessage": "already verified",
  "longMessage": "This verification has already been verified.",
  "code": "verification_already_verified"
}
Status Code: 429
{
  "shortMessage": "Too many verification code requests",
  "longMessage": "Too many verification code requests. Please wait at least 30 seconds to receive your code before trying again.",
  "code": "verification_code_too_many_requests"
}

VerificationExpired

VerificationExpired signifies an error when verification has expired

Status Code: 400
{
  "shortMessage": "expired",
  "longMessage": "This verification has expired. You must create a new one.",
  "code": "verification_expired"
}

VerificationFailed

VerificationFailed signifies an error when verification fails

Status Code: 400
{
  "shortMessage": "failed",
  "longMessage": "Too many failed attempts. You have to try again with the same or another method.",
  "code": "verification_failed"
}

VerificationInvalidLinkToken means that the provided JWT token from the link cannot be parsed.

Status Code: 400
{
  "shortMessage": "invalid link token",
  "longMessage": "Verification link token is invalid",
  "code": "verification_link_token_invalid"
}

VerificationInvalidLinkTokenSource means that the provided JWT token from the link has an invalid source type.

Status Code: 400
{
  "shortMessage": "invalid link token source",
  "longMessage": "Verification link token source is invalid",
  "code": "verification_link_token_source_invalid"
}

VerificationInvalidStrategy

VerificationInvalidStrategy signifies an error when the given strategy is not valid for current verification

Status Code: 400
{
  "shortMessage": "has invalid strategy",
  "longMessage": "The strategy is not valid for the current verification.",
  "code": "verification_strategy_invalid"
}

VerificationLinkTokenExpired means that the provided JWT token from the link has expired.

Status Code: 400
{
  "shortMessage": "expired link token",
  "longMessage": "Verification link token has expired",
  "code": "verification_link_token_expired"
}

VerificationMissing

VerificationMissing signifies an error when the verification is missing

Status Code: 400
{
  "shortMessage": "is missing",
  "longMessage": "This strategy requires verification preparation before attempting to validate it.",
  "code": "verification_missing"
}

VerificationNotSent

VerificationNotSent signifies an error when verification email was not sent

Status Code: 400
{
  "shortMessage": "not sent",
  "longMessage": "You need to send a verification code before attempting to verify.",
  "code": "verification_not_sent"
}

VerificationUnknownStatus

VerificationUnknownStatus signifies an unexpected error when unknown verification status is found

Status Code: 500
{
  "shortMessage": "Unknown verification status",
  "longMessage": "Found unknown verification status <status>",
  "code": "verification_status_unknown"
}
Status Code: 403
{
  "shortMessage": "Waitlist not accepting entries",
  "longMessage": "The waitlist is not accepting new entries at this time. Please try again later.",
  "code": "waitlist_not_accepting_entries"
}

Feedback

What did you think of this content?

Last updated on