Lorixen.
EN

Play Integrity and App Attest: is that request really your app?

Short answer: Your app's API is reachable by anyone, not just your app: scripts, modified copies and emulators can call the same endpoints to scrape prices, abuse sign-up offers or automate fake accounts. Google's Play Integrity API and Apple's App Attest let your server check that a request comes from your genuine, unmodified app on a real device. Use them for sensitive actions such as sign-up, redeeming promotions or high-value orders, verify the result on your server, roll out gradually, and treat them as one signal among several, never the only protection.

The problem: your API does not know who is calling

A mobile app talks to your back end over the internet. Anyone who inspects that traffic can write a script that sends the same requests. Typical abuse for business apps:

  • Bots creating thousands of accounts to claim a first-order discount or referral reward.
  • Scrapers pulling your entire catalogue and prices.
  • Modified app versions unlocking paid features.
  • Automated attempts to guess logins or gift card codes.

API keys embedded in the app do not stop this, because anything inside the app can be extracted. You need a way for the device and the platform to vouch for the app.

What Play Integrity does on Android

Google's overview describes the Play Integrity API as helping you check that user actions and server requests come from your genuine app, installed by Google Play, running on a genuine and certified Android device. It returns verdicts your back end uses to respond, including:

  • appIntegrity: whether you are interacting with your unmodified binary that Google Play recognises.
  • deviceIntegrity: whether the app is running on a genuine certified Android device or a genuine instance of Google Play Games for PC.
  • accountDetails: whether the user installed or paid for the app on Google Play.

The documentation describes standard requests, suitable for any app and made on demand, and classic requests, with both returning verdicts in the same format.

What App Attest does on iOS

Apple's DeviceCheck framework includes App Attest, which its documentation describes as giving your app a way to assert its validity so your server can more confidently provide access to sensitive resources. Apple's guide to establishing your app's integrity explains the flow: for each user account on each device, the app generates a unique, hardware-based cryptographic key pair, gets it attested by Apple, and then signs later requests with assertions your server checks.

Some points from Apple's guide:

  • Check whether the device supports the service with the isSupported property, and adapt both the app and your server, which can no longer require assertions, when it does not.
  • Keys survive regular app updates but not reinstallation, device migration or restoration from a backup, so limit new key generation to those events or new users; keeping the key count low helps detect some fraud.
  • Test in a development environment and onboard users gradually.

Where to use it

You do not need attestation on every request. Choose the actions where abuse costs you money or harms customers:

  • Account creation and first-order or referral offers.
  • Redeeming promo codes, gift cards or loyalty points.
  • Password resets and login after repeated failures.
  • High-value orders or bookings.
  • Endpoints that return large amounts of data.

Verify on the server

The result is only useful if your server checks it. The app obtains a token or attestation and sends it with the request; your back end verifies it with Google or Apple's verification process and decides what to do. Never let the app itself decide "this device is fine", since a modified app can lie.

Respond in proportion

Google's documentation advises using the API alongside other signals as part of an overall anti-abuse strategy, not as your only mechanism, and suggests sending a range of responses from your server rather than a simple allow or deny, because a range is harder for attackers to learn from. In practice:

  • Strong verdict: proceed normally.
  • Weak or missing verdict: allow but add friction, such as an extra verification step, a lower limit or manual review of a promotion.
  • Clear failure on a sensitive action: decline politely and log it.

Remember genuine customers on older or unusual devices, rooted phones or devices without Google Play services. Blocking them outright can cost more than the fraud. Log verdicts for a few weeks before enforcing anything, so you can see how many real customers would be affected and tune your responses on real data rather than guesses.

Plan for limits and outages

The Play Integrity overview states that by default an app can make up to 10,000 total requests per day across all installs, with the option to request more. Request verdicts only for the sensitive actions above, cache where the platform allows, and decide in advance what happens if the attestation service is slow or unavailable, usually falling back to your other checks rather than blocking everyone.

A worked example

Picture a hypothetical Nelson takeaway group whose app offered a discount on a customer's first order. Bots began creating accounts from emulators to claim the discount repeatedly.

The developers added Play Integrity checks on Android and App Attest on iOS for account creation and first-order discount redemption only. The server verifies each result; failed or missing verdicts still allow an account but withhold the discount until a phone number is verified. They rolled it out gradually and kept existing rate limits. Fraudulent discount claims dropped sharply, while customers on older phones could still order at full price.

FAQ

Does this replace user authentication?

No. It checks the app and device, not who the user is. Keep normal login and permissions.

Will it work for web versions of my app?

No. These are mobile platform features. Web apps need other defences, such as bot checks.

Can attackers bypass it?

Determined attackers sometimes can, which is why it should be one layer among several.

If bots or modified apps are abusing your app's offers or API, tell us what they're targeting.

Sources

WhatsAppBook a call