Native Guard
Unauthorized 401
The Native Guard Admin API could not authenticate the caller.
https://errors.swepay.com.br/native-guard/unauthorized What this means
The Native Guard Admin API (/admin/v1/*) returns this type when the
service itself rejects a request because it carries no valid authentication.
In normal operation the Admin API sits behind a gateway authorizer that validates the bearer token before the request reaches the service, so a missing, expired or invalid token is usually rejected at the gateway and that response does not carry this type. Handle both the same way.
The OAuth2/OIDC endpoints under /identity/v1/* do not use this type: they
report authentication failures with the RFC 6749 error /
error_description shape. The membership listing has its own types —
Missing Bearer Token and
Invalid Access Token.
Common causes
- No `Authorization` header was sent.
- The access token is expired or has been revoked.
- The token was issued by a different realm, or is not an access token.
How to resolve
Obtain a fresh access token from the realm's token endpoint and send it as
Authorization: Bearer <token>. The request is retryable only with a new
token — resending the same one keeps failing. Never log or echo the token
value.
error and errorDescription are deprecated compatibility members of the
Admin API; key your handling off type.
Example response
{
"type": "https://errors.swepay.com.br/native-guard/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authentication is required to access this resource.",
"traceId": "Root=1-00000000-000000000000000000000000;Parent=0000000000000000;Sampled=0",
"error": "unauthorized",
"errorDescription": "Authentication is required to access this resource."
} References
Machine-readable: /native-guard/unauthorized.json