palbaseDocs

Palbase Auth API · API

POST/auth/mfa/verify

Verify TOTP enrollment

Verify a pending TOTP enrollment by submitting the first code from the authenticator app. On success the enrollment is marked verified and may be used as a second factor on future logins. 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.

Request body

codestring · requiredFirst TOTP code from the authenticator app.
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/mfa/verify" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"code":"string"}'

Responses

200Enrollment verified

400Validation failed or required field missing

401Missing, invalid, or expired credentials

404Resource does not exist or is not visible to the caller

409Conflict with current resource state (duplicate, race)

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

Operation MfaVerifyEnrollment of auth's contract.