403 firebasevertexai.googleapis.com Blocked: Flutter Fix

The 403 "requests to this api firebasevertexai.googleapis.com are blocked" error means your Firebase API key's restrictions don't include the Firebase AI Logic API. No code changes, no new project, no billing change β€” five minutes in the Google Cloud console adding the API to the key's allowlist…

Last updated: October 21, 2026 Five minutes in the Google Cloud console, zero code changes, and your dead 403 becomes a working Gemini response. The error "requests to this api firebasevertexai.googleapis.com are blocked" looks terrifying, but its meaning is narrow: your Firebase API key is valid, yet its restrictions don't include the Firebase AI Logic API β€” so Google refuses to let that key call it. The fix is one checkbox on the key's restrictions page. Here's exactly where it is. 🎬 Watch: Firebase setup for a Flutter AI app [[YT|2pLM4Q1pUNQ|105|31:00|Data unavailable|Build a Full AI App in Flutter: Expense Tracker with Firebase + Gemini β€” Firebase setup chapter|The 1:45 chapter walks through Firebase project setup for a Flutter app using Firebase AI Logic; use it as the visual companion to the console-side configuration this fix requires.]] What the 403 "are blocked" error looks like The exact error from Firebase AI Logic: Requests to this API firebasevertexai.googleapis.com method google.firebase.vertexai.v1beta.GenerativeService.GenerateContent are blocked. It arrives as a 403 (not a 400), thrown from generateContent / sendMessage on your firebase_ai model (v5.0.0, Flutter BoM 5.0.0). The cruel detail: your API key is fine β€” Firebase initializes, other Firebase services work, and the key exists. Only the AI calls are refused. If you're seeing a 400 "API key not valid" instead, that's a different root cause (a stale key in firebase_options.dart ) with a different fix. Why it happens: firebase ai logic api key restrictions Every Firebase API key can carry API restrictions : an allowlist of which Google APIs the key may call. Firebase AI Logic calls the backend at firebasevertexai.googleapis.com β€” listed in the console as the Firebase AI…

Explore