The Play Integrity API is a Google Play service that lets an Android app and its backend verify whether a request comes from a genuine, unmodified app binary, installed through Google Play, running on a genuine Android device with a legitimate account. In mobile security, it is the standard remote attestation mechanism for Android and the successor to the deprecated SafetyNet Attestation API.
The API does not block anything on its own. It returns a signed and encrypted integrity verdict that the app forwards to its server, where the developer decides how to respond: allow the action, ask for extra verification, limit features or refuse the request.
How the Play Integrity API produces a verdict
The Play Integrity API works as a challenge and response protocol between the app, Google Play services and the developer’s backend. The app asks Google Play for an integrity token bound to a specific request, Google evaluates the app and device, and the backend decrypts and checks the token before trusting the action.
- The backend issues a unique nonce or the app computes a request hash over the sensitive action, such as a payment or a login.
- The app calls the Play Integrity library, which contacts Google Play services on the device.
- Google Play gathers signals: the app signing certificate, the installed version, device attestation data and account licensing state.
- Google returns an encrypted, signed token, which the app sends unchanged to its own server.
- The server decrypts the token, either through Google’s decode endpoint or locally with downloaded keys, and validates the nonce, package name and timestamp.
The decisive design principle is that trust decisions belong on the server. If the app itself interprets the verdict, an attacker who controls the device can patch out the check, which is exactly the threat the API exists to address.
Verdict fields and what they mean
Each decrypted token contains several independent verdict groups, and a robust backend evaluates them separately rather than treating the result as a single pass or fail. The table below summarizes the main fields.
| Field group | Typical values | What it tells the backend |
|---|---|---|
| Request details | Package name, nonce or request hash, timestamp | Whether the token belongs to this request and is fresh |
| App integrity | PLAY_RECOGNIZED, UNRECOGNIZED_VERSION, UNEVALUATED | Whether the binary matches a version distributed by Google Play |
| Device integrity | MEETS_BASIC_INTEGRITY, MEETS_DEVICE_INTEGRITY, MEETS_STRONG_INTEGRITY | How strongly the device appears genuine and unmodified |
| Account details | LICENSED, UNLICENSED, UNEVALUATED | Whether the user acquired the app through Google Play |
| Environment details | App access risk, Play Protect status | Whether risky apps are running or Play Protect is disabled |
The device integrity labels form a ladder of assurance. Basic integrity tolerates devices that may lack certification, device integrity requires a certified Android device with a locked bootloader, and strong integrity adds hardware-backed attestation and, on recent Android versions, a reasonably current security patch level.
| Level | Main requirement | Typical use |
|---|---|---|
| Basic integrity | Device passes basic system integrity checks | Low-risk features, broad reach |
| Device integrity | Certified device, verified boot, locked bootloader | Default bar for most protected actions |
| Strong integrity | Hardware-backed key attestation and recent patches | Banking, payments, high-value transactions |
| Virtual integrity | Recognized emulator such as Google Play Games for PC | Games that permit sanctioned emulators |
Standard and classic requests
The Play Integrity API offers two request types that trade latency against per-request uniqueness. Standard requests are recommended for frequent checks, while classic requests suit rare, high-value operations.
| Aspect | Standard request | Classic request |
|---|---|---|
| Preparation | Warm-up call prepares a token provider in advance | No warm-up; each call starts from scratch |
| Latency | A few hundred milliseconds after warm-up | Often several seconds |
| Replay protection | Request hash plus Google-side protection | Server-generated nonce checked by the backend |
| Best fit | Logins, API calls, in-game actions | Account recovery, large transfers, rare events |
Both types share a daily request quota per app, with a default that suits most apps and an increase available on request. Exceeding the quota or calling the API on every screen wastes budget, so teams usually attest at meaningful trust boundaries and cache the server-side decision for a short session.
Relationship to SafetyNet and neighboring controls
The Play Integrity API replaced the SafetyNet Attestation API, which Google deprecated and then shut down after a migration period. SafetyNet returned two simple booleans, basicIntegrity and ctsProfileMatch, whereas Play Integrity adds app recognition, licensing and environment signals and supports remediation dialogs.
Play Integrity is often confused with other Android protections in the same mobile security toolbox. Google Play Protect scans for harmful apps on the device, Android Verified Boot ensures the operating system has not been modified, and rooting is one of the conditions that typically causes integrity verdicts to fail. Play Integrity consumes the outcome of these mechanisms and reports it to the developer.
| Mechanism | Who consumes the result | Primary question answered |
|---|---|---|
| Play Integrity API | App developer’s backend | Can this request be trusted |
| SafetyNet Attestation | App developer’s backend (retired) | Is the device compatible and unmodified |
| Google Play Protect | User and Google | Are harmful apps installed |
| Android Verified Boot | Device bootloader | Is the system image authentic |
| Key attestation | Any relying party | Is this key stored in secure hardware |
Limitations and common implementation mistakes
The Play Integrity API raises the cost of abuse but is not a guarantee of safety. Determined attackers use leaked device keys, modified frameworks and hardware farms to obtain passing verdicts, and Google responds by revoking keys and tightening the strong level, so the verdict is best treated as one risk signal among several.
- Checking the verdict on the client lets attackers patch the check away; always evaluate on the server.
- Skipping nonce or hash validation enables replay of an old passing token.
- Requiring strong integrity everywhere locks out legitimate users on older or uncertified devices, including many custom ROM users.
- Ignoring UNEVALUATED results hides outages or quota exhaustion; define a fallback policy in advance.
- Relying on it outside Google Play fails for devices without Google Play services, such as many devices sold in China or de-Googled phones.
Privacy and fairness also matter. The verdict reveals coarse device state, and blanket denial policies can exclude users who chose alternative operating systems, so proportionate responses such as step-up authentication usually work better than hard blocks.
Stripped to the essentials
The Play Integrity API is like a trusted doorman who checks identification before letting a visitor into a building. When an app wants to do something important, such as move money, it asks Google to look at the phone and the app and write a sealed note about what it saw.
The app passes that sealed note to its own company server, which opens it and reads the verdict. If the note says the app is genuine and the phone has not been tampered with, the server says yes. If not, it can ask for more proof or say no. The key point is that the server, not the phone, makes the decision.
Where it is applied
A regional bank runs a mobile banking app used by about 400,000 customers. Fraud analysts notice that automated scripts on modified phones are creating accounts and testing stolen card numbers. The team adds standard integrity requests at login and before every transfer, binding each request hash to the transfer amount and recipient.
The backend allows routine actions when the device meets device integrity and the app is Play recognized. Transfers above a set limit require strong integrity; when it is missing, the server asks for an additional one-time code instead of blocking. Within the first months, scripted account creation falls sharply, while legitimate customers on older phones keep access through step-up verification. The bank gains a fraud signal without turning away honest users.