What is Xata?

Error: API key in browser

Edit on GitHub

#

Why this message occurred

Our SDK detected that you are using a Xata API key in a browser (Example API key: xau_xyz123).

✅ Only use Xata API keys in server-side code.

In some frameworks (e.g. Next.js) it can be unclear which code is server-side and which is client-side. If in doubt, try using the Xata SDK inside an API route.

⚠️ Xata API Keys have unrestricted permissions in your Xata database.

Xata API keys can:

  • Delete databases
  • read/write to all tables

On this page

Why this message occurredHow to fix thisWhy can't I use Xata API keys in a browser?