Palbase Auth API · API
/auth/devices/challengeGet a single-use enrolment challenge
Issues a single-use challenge, valid for 5 minutes, that the device embeds in its attestation — App Attest's, or an Android Keystore key's — and sends back to POST /auth/devices/attest/ios or POST /auth/devices/attest/android. No session is required. When a valid user token is sent, the challenge is scoped to that user; otherwise it is scoped to the installation anchor in X-Palbase-Installation-Anchor. A caller with neither gets a freshly minted anchor in installation_anchor and must send it back in X-Palbase-Installation-Anchor on the attest call. An anchor header that is not an issued ins_… anchor answers 400 invalid_installation_anchor. Rate limited per IP address. Takes no request body.
Called by your app, with the publishable key.
Headers
X-Palbase-Installation-Anchorstring · optionalThe installation anchor (`ins_…`) this device enrols under when the caller is not signed in: exactly the `installation_anchor` this server issued (`ins_` and a UUID). Anything else answers 400 `invalid_installation_anchor`. Ignored when a valid session is present.curl -X POST "https://<your-ref>.palbase.studio/auth/devices/challenge" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY"Responses
200Challenge issued
400Validation failed or required field missing
401Missing, invalid, or expired credentials
429Rate limit exceeded
503Downstream dependency unavailable (typically HIBP / breach service)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation CreateDeviceChallenge of auth's contract.