Palbase Auth API · API
/admin/test-users/phoneSet a test user's phone
Gives an existing test user, found by email, a verified phone and the fixed code that phone accepts at sign-in. Setting the same phone and code again succeeds. Only test users: an email that does not belong to a test user of this project is 404 test_user_not_found.
Called by your server, with the project's secret key.
Request body
emailstring (email) · requiredThe test user's email.otpstring · requiredThe fixed code this phone accepts at sign-in.phonestring · requiredE.164.curl -X PUT "https://<your-ref>.palbase.studio/admin/test-users/phone" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"email":"user@example.com","otp":"string","phone":"string"}'Responses
204Done; no body
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 AdminSetTestUserPhone of auth's contract.