palbaseDocs

Palbase Auth API · API

POST/auth/anonymous

Sign in as a guest

Opens a guest account and its session: an account with no address, password or credential, whose id stays when it becomes an account — by POST /auth/anonymous/convert (an address and a password), by adding a passkey (POST /auth/webauthn/register/begin, with user_name), or by linking a provider (POST /auth/oauth/transactions with the guest's session). What the visitor does as a guest is kept under that id.

The project must have turned guests on (anonymous_sign_ins; 403 anonymous_sign_ins_disabled otherwise). Held to what holds signup: the project's sign-up switch and user ceiling (signups_enabled, 403 signups_closed), proof of work (403 pow_required, with the challenge), the risk engine and the project's before.user.create hook (told is_anonymous) — and to 30 guests an hour from one address (429). The access token carries is_anonymous: true; a native client that sends a DPoP proof gets the session and its tokens bound to that key, as a sign-in does. Send an Idempotency-Key: a retry then gets the same guest back, not a second one.

Called by your app, with the publishable key.

Headers

X-PoW-Challenge-IDstring · optionalThe challenge a previous `pow_required` answer carried.
X-PoW-Noncestring · optionalThe nonce that solves it.

Request body

fingerprint_visitor_idstring · optionalThe visitor id the Fingerprint agent produced on this device; scored by the risk engine when the project has connected Fingerprint.
localestring · optionalBCP 47 language tag for the guest's messages (e.g. `tr`, `en-US`).
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/anonymous" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "content-type: application/json" \
  -d '{"fingerprint_visitor_id":"string","locale":"string"}'

Responses

201Guest opened — token pair returned, `user.is_anonymous` true

400Validation failed or required field missing

403A proof of work is required (`pow_required`, with the challenge), or guests are refused (`anonymous_sign_ins_disabled`, `signups_closed`, `hook_denied`, `ip_blocked`).

429Rate limit exceeded

503Downstream dependency unavailable (typically HIBP / breach service)

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

Operation SignInAnonymously of auth's contract.