ErrorsBrowser
Invalid API key
The key your app sent was not accepted
The service received a key it does not recognise for this project.
Why it happens
In an AI-built app, specifically
The key is missing from the published build rather than wrong — an environment variable set locally and not in the deployment. When a variable is absent the value becomes `undefined`, and `undefined` is sent as a key. Rotating a key without rebuilding does the same thing, since the old value is baked into the bundle.
Steps
How to fix it
- 01Check the variable is set in your host's production environment, not only locally.
- 02Trigger a fresh build. These values are inlined at build time; republishing without rebuilding changes nothing.
- 03Confirm the key belongs to the same project as the URL the app is calling.
Still stuck
If the steps did not do it
An error is one symptom, and the cause is often somewhere else entirely. The broken-app check reads your published site and looks at everything at once — and if it cannot tell either, connecting your repository is what lets Refinar read the code and fix it.