Palbase Auth API · API
/admin/token/customMint a custom sign-in token
The server half of custom sign-in: your backend authenticates a user its own way and mints a short-lived, single-use token for them; the app exchanges it for a session at /auth/token/exchange.
Called by your server, with the project's secret key.
Request body
claimsobject · optionalClaims carried to the exchange.expires_ininteger · optionalSeconds until the token expires (default and maximum 3600).user_idstring · requiredThe user the token signs in.curl -X POST "https://<your-ref>.palbase.studio/admin/token/custom" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"user_id":"string"}'Responses
201Minted
400Validation failed or required field missing
401Missing, invalid, or expired credentials
403Not permitted with this key; or the project is the platform's own (`owner_only`): every change on its admin surface — any account's address, password, factors, sessions or roles, an account made or imported, a sign-in minted, a setting — is its owner's or its operator's alone. The request carries, besides the project's key, the owner's access token (X-Palbase-Owner; a passkey sign-in of the last 15 minutes, else 401 `insufficient_user_authentication`) or the operator's token (X-Palbase-Operator). Its key reads.
404Resource does not exist or is not visible to the caller
503Downstream dependency unavailable (typically HIBP / breach service)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation AdminCreateCustomToken of auth's contract.