Sign in

Validate Password Reset Token

POST https://{organization}.myguper.com/api/connect/password-reset/validate

Validates a password-reset token without consuming it.

This is a pre-flight check — the caller uses it to decide what to show the user before they type a new password. The token remains pending and can still be confirmed afterwards.

The caller authenticates via RSA signature (OriginValidation middleware), the same mechanism used in the request and confirm steps.

The endpoint checks, in order:

  1. Existence — the SHA-256 hash of the raw token must match a row in password_reset_request.
  2. Organization — the row must belong to the current organization.
  3. Status — used and superseded tokens are rejected with a specific reason so the UI can show an appropriate message.
  4. Expiration — tokens older than 1 hour are rejected as expired.

If all checks pass, the response is { "valid": true }. Otherwise, { "valid": false, "reason": "..." } with one of the reason codes below.

Reason codes: | Code | Meaning | |------|---------| | not_found | Token does not exist or belongs to another organization | | used | Token was already consumed by a confirm call | | superseded | A newer reset was requested for the same login | | expired | Token is older than 1 hour |

Try-it values populated from environment ACME (Demo)


Authentication

Signature

RSA signature via OriginValidation middleware. Send the user-agent header with the calling system's name and the signature header with the RSA-signed nonce.

Headers

Name Type Description
x-guper-authorization * string User token issued by Guper.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Request body

Content-Type: application/json

{
    "token": "a1b2c3d4e5f6...64 hex characters"
}

Responses

{
    "valid": true
}

Related

Copied to clipboard