Errors

Every error is one JSON envelope. Branch on code; show message to a developer, never to a member.

json
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_secret_key",
    "message": "Invalid secret key.",
    "param": "..."          // present when one field is at fault
  }
}

Codes you will actually see

StatusCodeDo
401invalid_secret_keyThe key is missing, malformed, or unknown. Check which credential your server sends.
401publishable_key_usedYou sent pk where sk belongs. Sessions are minted server-side with the secret key.
403key_revokedRotated past grace, or revoked. Deploy the replacement key.
403account_suspendedYour company's access is off. Contact support.
400missing_host_user_refSessions require your member ID — it is the billing unit.
429rate_limit_exceededBack off and retry. Applies to auth endpoints.
429quota_exceededThe app's daily session ceiling. Contact support if legitimate traffic hit it.

SDK-side failures

The SDK surfaces failures as ScanError values with a readable description — network, session invalid, capture abandoned (the member changed their mind; not an error to alarm on), or a named processing step. A scan that completed offline still returns its result; only the usage report waits for connectivity.