authentication_failed

Error cause indicating authentication failed due to missing, invalid, or expired credentials.


What this means

The Commerce API could not verify your identity because the API key or authentication token provided in your request is missing, malformed, invalid, or has expired. Every API request must include a valid API key in the Authorization header using the format Authorization: Bearer YOUR_API_KEY. When this cause appears, it means the authentication layer rejected your credentials before the request even reached the business logic—for example, creating a new order without an Authorization header, or using a revoked API key.

This differs from authorization_failed where your credentials are valid but lack permission for the specific operation. Authentication failures are permanent errors that require correcting your credentials, not transient issues that resolve with retries. The error typically results in an HTTP 401 status code, signaling that you need to provide valid, active credentials before the Commerce API will process any aspect of your request.


Example error response

{
  "error": {
    "type": "bad_request",
    "cause": "authentication_failed",
    "code": "1401",
    "message": "authentication failed",
    "detail": "The request could not be authenticated. Ensure you are providing a valid API key in the Authorization header.",
    "fix_code": "change_request_parameters",
    "url": "https://commerce.zebo.dev/e/1401"
  }
}

Was this page helpful?