swepayError Catalog

Native Guard

Invalid Recovery Token 400

The recovery token is invalid, expired, or was already used.

type https://errors.swepay.com.br/native-guard/biometric-recovery-invalid-recovery-token

What this means

Returned by POST /identity/v1/realms/{realm}/recovery/password when the recovery token cannot be used to set a new password. The password was not changed.

A recovery token is issued by POST /identity/v1/realms/{realm}/recovery/biometric, is valid for a few minutes and can be used once. The response is the same whether the token is malformed, unknown, expired or already used — it deliberately does not say which.

Common causes

  • The token expired before the new password was submitted.
  • The token was already used, for example when a request that had succeeded was sent again.
  • The token was truncated or altered, or sent to a different realm than the one that issued it.

How to resolve

Not retryable with the same token. Start the recovery again: run a new biometric verification, exchange it for a new recovery token, and submit the new password promptly.

If an earlier password request may have succeeded (timeout or dropped connection), let the user try to sign in with the new password before starting over. Never log or echo the recovery token.

Example response

HTTP 400 · application/problem+json
{
  "type": "https://errors.swepay.com.br/native-guard/biometric-recovery-invalid-recovery-token",
  "title": "Invalid Recovery Token",
  "status": 400,
  "detail": "The recovery token is invalid, expired, or already used.",
  "traceId": "Root=1-00000000-000000000000000000000000;Parent=0000000000000000;Sampled=0"
}

References

Machine-readable: /native-guard/biometric-recovery-invalid-recovery-token.json