palbaseDocs

Palbase Auth API · API

POST/auth/devices/verify/android

Verify a request-bound Play Integrity token

Verifies a Standard Play Integrity token bound to one request: the verdict must be at most 5 minutes old, carry expected_request_hash, name the same package and report the app as Play-recognised with device integrity. Nothing is stored. A token that fails any of these is refused with 403 and the reason (request_hash_mismatch, package_name_mismatch, integrity_verdict_expired, app_integrity_failed, device_integrity_failed, emulator_detected). A token this project cannot decode answers 400 invalid_verdict_token; 409 play_integrity_not_configured when this project has no Play Integrity integration; 503 integrity_service_unavailable when Google could not be reached.

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

Request body

expected_request_hashstring · requiredSHA-256 of the request the token was bound to, base64url without padding.
package_namestring · required
verdict_tokenstring · requiredThe Standard Play Integrity token.
curl
curl -X POST "https://<your-ref>.palbase.studio/auth/devices/verify/android" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"expected_request_hash":"string","package_name":"string","verdict_token":"string"}'

Responses

200Token verified

400Validation failed or required field missing

401Missing, invalid, or expired credentials

403Authenticated but not permitted (banned, hook denial, role mismatch)

409Conflict with current resource state (duplicate, race)

503Downstream dependency unavailable (typically HIBP / breach service)

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

Operation VerifyAndroidIntegrity of auth's contract.