swepayError Catalog

Native Guard

Missing Bearer Token 401

The membership listing was called without a Bearer access token.

type https://errors.swepay.com.br/native-guard/memberships-missing-token

What this means

Returned by GET /identity/v1/realms/{realm}/me/memberships when the request carries no usable Authorization: Bearer credential. This endpoint lists the memberships of the user identified by the access token, so it cannot be called anonymously.

If a token was sent but rejected, the response is Invalid Access Token instead.

Common causes

  • No `Authorization` header was sent.
  • The header uses a scheme other than `Bearer`.
  • The header is `Bearer` followed by an empty value.

How to resolve

Send the user's access token as Authorization: Bearer <token>. The request is retryable as soon as the header is present. Never log or echo the token value.

Example response

HTTP 401 · application/problem+json
{
  "type": "https://errors.swepay.com.br/native-guard/memberships-missing-token",
  "title": "Missing Bearer Token",
  "status": 401,
  "detail": "A valid Bearer access token is required.",
  "traceId": "Root=1-00000000-000000000000000000000000;Parent=0000000000000000;Sampled=0"
}

References

Machine-readable: /native-guard/memberships-missing-token.json