Implement Google Play Integrity API classic request flow with nonce for high-value actions

domain: developer.android.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Register your app in Google Play Console and enable the Play Integrity API; link a Cloud project for server-side token decryption access
  2. On the backend, generate a cryptographically random nonce string (at minimum 16 bytes, Base64-encoded) per request; store it server-side associated with the session
  3. In the app, pass the nonce to IntegrityTokenRequest.builder().setNonce(nonce).build() and call integrityManager.requestIntegrityToken() to obtain the integrity token
  4. Send the integrity token to your backend; do not decrypt it client-side
  5. On the backend, call the Play Integrity API with the token and your package name; verify the nonce in the decrypted payload matches the server-stored nonce before trusting the verdict
  6. Use classic requests sparingly — only for high-value actions such as account recovery or large transactions — due to higher latency (seconds) and greater battery and data cost

Known gotchas

Related routes

Integrate Play Integrity API standard request flow for Android server-side verification
developer.android.com · 6 steps · unrated
Decode Play Integrity API token verdict fields and handle remediation dialogs
developer.android.com · 6 steps · unrated
Migrate Android app from deprecated SafetyNet Attestation API to Play Integrity API
developer.android.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans