NewStripe: a buyer with a NIF always gets a standard invoice, and the simplified threshold is deprecated
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog
ErrorsAll codes

UNAUTHORIZED

Authentication is required to access this resource


Category: Authentication

HTTP status401 Unauthorized
RetryAfter fixing the cause

When it happens

The request has no valid credential: the Authorization header is missing, or the API key in it is wrong or no longer valid (for example, revoked). The response does not say which. When a credential was sent, its WWW-Authenticate header says invalid_token.

How to fix it

Send Authorization: Bearer <your API key> with an active key. If the key was revoked, create a new one.

Retry

Not as is: the same request fails the same way. Fix the cause described above, then send the request again, under a new Idempotency-Key if the body changed.

Example response

When this error occurs, the API answers 401 Unauthorized with a JSON body of this shape:

{
  "type": "https://docs.beel.es/errors/UNAUTHORIZED",
  "title": "UNAUTHORIZED",
  "detail": "Authentication is required to access this resource",
  "instance": "/v1/<resource>",
  "errors": [],
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication is required to access this resource",
    "details": {}
  },
  "meta": {
    "timestamp": "2026-05-21T10:00:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

The type URI is stable and always resolves to this page.

Message

Authentication is required to access this resource
Se requiere autenticación para acceder a este recurso
Es requereix autenticació per accedir a aquest recurs

Send the request with Accept-Language: <es|en|ca> to receive the message in your preferred language.

Other errors in this category

Keep exploring