What is app attestation?
App attestation proves to your backend that a request comes from an unmodified build of your app running on a genuine device that meets your policy. The proof comes from the platform itself, Apple App Attest on Apple devices, Key Attestation and Google Play Integrity on Android, and arrives at your API as a short-lived token.
Why pinning alone does not protect your API
Certificate pinning makes sure your app only talks to your real servers. It says nothing about who is on the other end of your API. A script replaying captured requests, a repackaged build of your app, or an emulator farm all reach the same endpoints, and with a valid user session they look exactly like your app.
Attestation closes that side. Your API can tell a request from your app, on a real device, from everything else, and decide what everything else may do: allow it while you measure, challenge it, or refuse it.
How app attestation works with TrustPin
The device proves itself
Once per device key, the attestation module asks Apple or Google for evidence that this is your app on a genuine device, and sends it to your verifier.
Your verifier issues a token
The verifier checks the evidence against the policy you signed in the TrustPin console and returns a short-lived token. Later tokens are renewed with a signature from the same key, without another Apple or Google round trip.
The app sends it
The SDK adds headers to HTTPS requests for the hosts you choose, through the same HTTP integrations it uses for pinning.
Your API decides
Your API or gateway verifies the token against the verifier's public keys and decides what a request without a valid token may do.
Token checks are a few lines in your API, and there are tested recipes for nginx, Envoy, Kong, Cloudflare Workers and AWS API Gateway. The developer documentation covers the policy, the verifier, each SDK and the rollout.
What you get
Built on platform evidence
Apple App Attest keys live in the Secure Enclave; Android keys in the Keystore, checked with Key Attestation and Play Integrity as your policy asks. A forged or replayed attestation never yields a token.
Runs in your infrastructure
The verifier is a container image you deploy next to your API. TrustPin serves the signed policy it reads and nothing else: no attestation traffic reaches TrustPin.
Bound to the session
A token can be bound to the user's session, so a token copied out of one session is useless in another. Only a SHA-256 of the value leaves the device.
Monitor, then enforce
In monitor mode every token records the policy result and your API lets requests through. Switch to enforce once the numbers show your real users attest.
Assertions for sensitive operations
For a payment or a password change, the app adds an assertion bound to that one operation and signed by the attested key, so a reused token is not enough.
No device identifiers
Tokens and events carry no device or end-user identifiers. TrustPin stores app identifiers only, and your keys and credentials stay in your environment.
Who runs what
TrustPin operates no attestation service in your request path. Everything that sees a request runs in your app or your infrastructure.
| Component | Runs at | Role |
|---|---|---|
| TrustPin console and CLI | TrustPin | Set up, sign and publish the attestation policy |
| TrustPin CDN | TrustPin | Serves the signed policy to your verifier |
| Attestation verifier | Your infrastructure | Checks the evidence against the policy and issues tokens |
| SDK attestation module | Your app | Produces evidence, renews tokens, adds the header |
| Your API or gateway | Your infrastructure | Verifies tokens and decides what unattested requests may do |
What does it cost?
Nothing extra. App attestation is included in every TrustPin plan, the Free plan too, because the verifier runs in your own infrastructure. Your only additional cost is hosting it. TrustPin offers managed verifiers; that service is priced separately.
Pinning, attestation and runtime protection
Each layer answers a different question. Pinning: is the app talking to my real server? Attestation: is my API talking to my real app? Runtime protection: is the app being tampered with while it runs? Attestation does not detect hooking, debugging, root or jailbreak; for that layer TrustPin partners with Promon.
Every TrustPin SDK, from 7.1.0
- iOS and macOS
TrustPinAttestKit, Apple App Attest
- Android
kotlin-attest, Key Attestation and Play Integrity
- Flutter
trustpin_attest, iOS, macOS and Android
- React Native
@trustpin/react-native-attest, Expo and bare
The attestation module builds on the pinning SDK, so the verifier's own connection is pinned too. Using an AI coding agent? The trustpin-attestation skill adds attestation to an app and token checks to your API.
Frequently asked questions
What is app attestation?
App attestation proves to your backend that a request comes from an unmodified build of your app running on a genuine device that meets your policy. The device produces evidence from the platform, Apple App Attest or Android Key Attestation and Google Play Integrity, your verifier checks it and issues a short-lived token, and the app sends that token with its API requests. Your API verifies the token and decides what a request without one may do.
Does app attestation cost extra?
No. App attestation is included in every TrustPin plan, the Free plan too, when you run the attestation verifier in your own infrastructure, which is how it works today. Your only additional cost is hosting the verifier. TrustPin offers managed verifiers that are priced separately.
Does TrustPin see my users' requests?
No. The verifier runs in your infrastructure and your API checks the tokens, so no attestation traffic passes through TrustPin. TrustPin serves the signed policy your verifier reads and stores identifiers only: Team IDs, bundle IDs, package names, signing-certificate digests and the Google Cloud project number. Your verifier's signing keys, challenge secrets and Google credentials never leave your environment.
Does attestation replace certificate pinning or RASP?
Neither. Pinning protects the connection from the app's side: the app only talks to your real servers. Attestation protects your API: it only accepts requests from your real app. Attestation is also not runtime protection: it does not detect hooking, debugging, root or jailbreak. For that layer TrustPin partners with Promon. The three together cover the network, the API and the app runtime.
Which platforms are supported?
iOS and iPadOS 15+, macOS 13+, Mac Catalyst 15+, tvOS 15+, watchOS 9+ and visionOS 2+ with Apple App Attest, and Android API 25+ with Key Attestation, Play Integrity or both. The Swift, Kotlin, Flutter and React Native SDKs all include an attestation module from version 7.1.0. Simulators and emulators use a debug token during development.
What happens on a device that cannot attest?
The SDK reports it and sends the request without the attestation header, and your API decides what that request may do. That is why a rollout starts in monitor mode: you measure how many real devices attest successfully before you start rejecting the ones that do not.
