swepayError Catalog

Native Guard

Missing Bearer Token 401

The TOTP step-up was called without a Bearer access token.

type https://errors.swepay.com.br/native-guard/step-up-totp-missing-token

What this means

Returned by POST /identity/v1/realms/{realm}/stepup/totp when the request carries no usable Authorization: Bearer credential. This endpoint elevates the session behind the caller's own access token, so it cannot be called anonymously. The TOTP code was not checked and no attempt was counted.

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 access token of the session to elevate as Authorization: Bearer <token>, together with the TOTP code in the body. 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/step-up-totp-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/step-up-totp-missing-token.json