canonical: https://jentic.com/apis/googleapis.com/firebaseappcheck

# Google Firebase App Check API

The Firebase App Check API helps protect backend resources from abuse such as billing fraud and phishing by attesting that traffic originates from your genuine app. It supports multiple attestation providers including App Attest, Play Integrity, DeviceCheck, reCAPTCHA Enterprise, reCAPTCHA v3, and SafetyNet, exchanging provider tokens for short-lived App Check tokens. Use it to enforce app authenticity for Firestore, Realtime Database, Cloud Functions, and other Firebase backends.

## For AI agents

Exchange platform attestation tokens for Firebase App Check tokens and manage App Check provider configurations so an agent can lock backend resources to genuine app traffic.

## Scope

Does not authenticate end users, scan code for vulnerabilities, or replace Firebase Security Rules - use for attesting app authenticity and enforcing App Check on Firebase services only.

## Capabilities

- Exchange Apple App Attest, DeviceCheck, and Play Integrity tokens for App Check tokens
- Verify reCAPTCHA Enterprise and reCAPTCHA v3 site tokens against an App Check resource
- Generate App Attest challenges and Play Integrity challenges for client attestation flows
- Configure per-service App Check enforcement for Firestore, Realtime Database, and Storage
- Issue debug tokens for App Check during local development and CI testing

## Use cases

### Backend Abuse Protection for Firestore

Lock Firestore reads and writes to traffic that has been attested by App Check, blocking direct API hits from emulators, scraped credentials, or modified app binaries. The API exposes service config endpoints under projects/{project}/services/{service} so enforcement can be toggled to UNENFORCED, AUDIT, or ENFORCED per service. Rolling out enforcement typically takes a release cycle to gather audit data before turning on full enforcement.

Example prompt: Call PATCH /v1/{+name} on projects/PROJECT/services/firestore.googleapis.com with enforcementMode=ENFORCED and confirm via GET /v1/{+name} that the new mode is set.

### iOS App Attest Token Exchange

Exchange an Apple App Attest assertion or attestation produced on the device for a short-lived Firebase App Check token used in subsequent Firebase requests. The flow uses generateAppAttestChallenge to issue a challenge and exchangeAppAttestAttestation or exchangeAppAttestAssertion to redeem it. This proves the request came from a genuine, unmodified iOS app.

Example prompt: Call POST /v1/{+app}:generateAppAttestChallenge for an iOS app, then POST /v1/{+app}:exchangeAppAttestAttestation with the device-signed attestation and store the returned App Check token.

### Android Play Integrity Verification

Validate Android client requests by exchanging a Play Integrity token from the Google Play Integrity API for a Firebase App Check token. The exchangePlayIntegrityToken endpoint lets backends trust that requests come from a Play-distributed binary running on a non-tampered device. This is the recommended attestation provider for current production Android apps.

Example prompt: Call POST /v1/{+app}:exchangePlayIntegrityToken with playIntegrityToken set to the JWS produced by Play Integrity for the Android app and store the returned token in the request header X-Firebase-AppCheck.

### Agent-Managed App Check Rollout via Jentic

An AI agent connected to Jentic can configure and gradually roll out App Check enforcement across Firebase services in response to a security review. Jentic exposes the 27 App Check endpoints, the agent loads service config and debug-token operations, and the OAuth 2.0 flow stays inside your Jentic One instance rather than the agent context.

Example prompt: Through Jentic, search for configure firebase app check enforcement, load the services.patch operation, and execute it with name=projects/PROJECT/services/firebasestorage.googleapis.com and enforcementMode=AUDIT.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/{+app}:exchangePlayIntegrityToken | Exchange a Play Integrity token for an App Check token |
| POST | /v1/{+app}:exchangeAppAttestAttestation | Exchange an Apple App Attest attestation for an App Check token |
| POST | /v1/{+app}:exchangeRecaptchaEnterpriseToken | Exchange a reCAPTCHA Enterprise token for an App Check token |
| POST | /v1/{+app}:generateAppAttestChallenge | Generate a challenge for the App Attest flow |
| POST | /v1/{+app}:exchangeDebugToken | Exchange a debug token for an App Check token |
| POST | /v1/{+app}:exchangeCustomToken | Exchange a custom token for an App Check token |

## Key resources

- **App Token Exchange** — Exchange App Attest, DeviceCheck, Play Integrity, reCAPTCHA, and SafetyNet tokens for App Check tokens
- **Service Config** — Read and update App Check enforcement mode per Firebase service
- **Debug Tokens** — Create, list, get, patch, and delete debug tokens used during local development
- **App Attestation Configs** — Configure App Attest, Play Integrity, DeviceCheck, reCAPTCHA, and SafetyNet provider settings per app

## Why Jentic

- **Setup:** Wiring the Firebase App Check API by hand means standing up Google OAuth 2.0 with a service account for management calls while keeping platform attestation tokens client-side, and reading Google's spec to map each token-exchange operation. Through Jentic you install once, import the Firebase App Check API from the API Directory, store the service-account credential once, and your agent calls it.
- **Permission scoping:** App Check puts the app resource in the URL path (/v1/{app}:exchangePlayIntegrityToken, /v1/{app}:generateAppAttestChallenge), so a rule can pin your agent to one app and nothing else. You choose the operations it may call, so token exchanges beyond the ones you name are not included unless you add them.
- **Credential handling:** Your Google service-account credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'exchange a Play Integrity token' or 'generate an App Attest challenge', and Jentic returns the matching Firebase App Check operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Firebase Management API** — Registers the apps that App Check then attests.
- **Firebase Rules API** — Enforces per-resource access rules that work alongside App Check.
- **Google Identity Toolkit API** — Authenticates end users rather than attesting app authenticity.

## FAQ

### What authentication does the Firebase App Check API use?

Management endpoints (service configs, debug tokens, attestation configs) use Google OAuth 2.0 with the firebase or cloud-platform scope. Token exchange endpoints accept the platform attestation token (App Attest, Play Integrity, reCAPTCHA, etc.) directly. Through Jentic, OAuth credentials live in the encrypted vault and never enter agent context.

### Can I exchange a Play Integrity token for an App Check token via the Firebase App Check API?

Yes. POST /v1/{+app}:exchangePlayIntegrityToken takes a Play Integrity JWS in the playIntegrityToken field and returns a short-lived App Check token suitable for the X-Firebase-AppCheck header on Firestore, Realtime Database, Cloud Storage, and Cloud Functions calls.

### What are the rate limits for the Firebase App Check API?

Google enforces standard per-project quotas on the App Check API. Token exchange endpoints are designed for per-request invocation and scale with your app's traffic; management endpoints (service config, debug tokens) are subject to lower per-minute quotas typical of management APIs.

### How do I enforce App Check on Firestore through Jentic?

Run pip install jentic, search for configure firebase app check enforcement, load the services.patch operation, and execute it with name=projects/PROJECT/services/firestore.googleapis.com and enforcementMode=ENFORCED. Get started with Jentic One, the self-hosted execution layer.

### Does the Firebase App Check API support reCAPTCHA Enterprise?

Yes. POST /v1/{+app}:exchangeRecaptchaEnterpriseToken accepts a reCAPTCHA Enterprise token from a Web client and returns an App Check token. There is also exchangeRecaptchaV3Token for reCAPTCHA v3 site keys.

### Is the Firebase App Check API free?

App Check itself is included with Firebase at no extra charge under typical usage. Underlying provider services such as reCAPTCHA Enterprise are billed separately according to their own pricing.

### Can I limit what my agent is allowed to do with the Firebase App Check API?

Yes. Because you run Jentic One yourself, your own rules decide which of the 27 App Check operations the agent may call, so you can allow only what a task needs, such as exchangePlayIntegrityToken or generateAppAttestChallenge, and exclude the rest. Since App Check puts the app resource in the URL path, like /v1/{app}:exchangePlayIntegrityToken, a rule can pin the agent to a single Firebase app and no other. Your Google service-account credential is stored encrypted by your own instance and injected only at execution time, so it never enters the agent's prompt or context.
