403 PERMISSION_DENIED: Firebase AI Logic has been deactivated in this project. To resume using Firebase AI Logic, you must enforce Firebase App Check
I'm trying to implement Firebase AI Logic into my application, but when I call generateContent(), I get the following error:
> Firebase AI Logic has been deactivated in this project. To resume using Firebase AI Logic, you must enforce Firebase App Check. Learn more: https://firebase.google.com/docs/ai-logic/app-check
This is my code:
val model = Firebase.ai(backend = GenerativeBackend.googleAI()) .generativeModel("gemini-3.6-flash") val response = model.generateContent("Hello?")
I have used this project in the past, and when I go to the Firebase console, I don't see anything out of the ordinary:

Does this mean I should enable Firebase App Check?
This is part of a change introduced for Firebase AI Logic in August 2026.
Projects with no recent usage of Firebase AI Logic are marked as "inactive" and will get this 403 error when trying to call generateContent().
The steps to restore the Firebase AI Logic service are outlined in the Firebase Documentation:
> When you're ready to start using Firebase AI Logic again, do the following: > > 1. Implement and enforce Firebase App Check for Firebase AI Logic. For local development, make sure that you implement the App Check debug provider. > > Enforcing App Check is critical to help protect the Gemini API from abuse, and its enforcement is required to clear this error. > > 2. Send a request from your app to Firebase AI Logic. > > This request will send along a valid App Check token, and you'll no longer get this 403 - PERMISSION_DENIED error. > > 3. When you're ready to release your AI feature to end-users, make sure that you keep App Check enforced and that you implement a production attestation provider for App Check.
Rosário P. Fernandes