palbaseDocs

Palbase Auth API · API

POST/auth/anonymous/convert/verify

Confirm the signed-in guest's conversion with its code

Completes the signed-in guest's waiting conversion (POST /auth/anonymous/convert) with the code mailed to its address. The code is tried against this guest's own code and no other — a code entered with the address alone (POST /auth/verify-email) completes no guest's conversion. Five wrong codes end the conversion — counted one after the other however many arrive at once: ask for it again. Redeemed, the guest becomes the account under the same id and user.converted is told; the next refresh carries tokens without is_anonymous. 409 email_exists when another account took the address meanwhile; the guest stays one.

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

Request body

codestring · requiredThe code mailed to the address the guest waits on.
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/anonymous/convert/verify" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"code":"string"}'

Responses

200The guest is an account

400Validation failed or required field missing

401Missing, invalid, or expired credentials

409Conflict with current resource state (duplicate, race)

429Rate limit exceeded

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

Operation VerifyAnonymousConversion of auth's contract.