palbaseDocs

Palbase Auth API · API

POST/auth/mfa/recovery-codes/regenerate

Regenerate recovery codes

Regenerate recovery codes — invalidates all previously issued codes and returns a fresh batch. The new codes are returned only in this response and cannot be retrieved later. An account whose email address is not confirmed is refused (403 email_unconfirmed): no sign-in method is added to it until its address is confirmed, as its owner, proving the address, takes the account as it was opened.

Called by a signed-in user of your app, with their token and the publishable key.

curl
curl -X POST "https://<your-ref>.palbase.studio/auth/mfa/recovery-codes/regenerate" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN"

Responses

200Fresh recovery codes

401Missing, invalid, or expired credentials

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation MfaRegenerateRecoveryCodes of auth's contract.