# Troubleshooting: API key errors

> Exact LAWDE Shield API key error messages — “Missing API key”, “Invalid or revoked API key.”, KEY_DORMANT, no ingest permission — what each means and how to fix it.

Source: https://www.lawde.net/docs/troubleshooting/api-keys

Each message below is quoted exactly as LAWDE returns or prints it. The agent does not print LAWDE’s reply. To see it, send one test error with cURL (see [Getting started](https://www.lawde.net/docs/getting-started#http)) or run `npx @lawdeshield/cli init` again.

## Messages

### `Missing API key. Provide x-lawde-api-key or Authorization: Bearer <key>.`

- Where: Ingest API response (HTTP 401)
- Code: `Unauthorized`
- Message: `Missing API key. Provide x-lawde-api-key or Authorization: Bearer <key>.`
- What it means: The request reached LAWDE without a key. Usually `LAWDE_API_KEY` is set on your machine but not where the app runs.
- Fix:
  - Send the key in the `x-lawde-api-key` header, or as `Authorization: Bearer <key>`.
  - Set `LAWDE_API_KEY` in your host’s environment settings too: `.env` and `.env.local` are usually not deployed. On Vercel: `vercel env add LAWDE_API_KEY production`, then redeploy.

### `Invalid or revoked API key.`

- Where: Ingest API response (HTTP 401)
- Code: `Unauthorized`
- Message: `Invalid or revoked API key.`
- What it means: The key does not match an active key in any workspace: it was mistyped, cut short, revoked, or replaced.
- Fix:
  - Check the value has no spaces or quotes around it. LAWDE keys start with `lawde_`.
  - Run `npx @lawdeshield/cli init` again, or create a key in [Settings → API keys](https://www.lawde.net/settings/api-keys).
  - Update the key wherever the app runs, then redeploy or restart.

### `API key is dormant due to workspace plan limits. Upgrade your plan or activate this key in Settings.`

- Where: Ingest API response (HTTP 403)
- Code: `KEY_DORMANT`
- Message: `API key is dormant due to workspace plan limits. Upgrade your plan or activate this key in Settings.`
- What it means: The workspace has more keys than its plan allows, and this key is one of the inactive ones.
- Fix:
  - Activate this key in Settings, turning off another one if needed.
  - Or move to a plan with more keys: [Pricing](https://www.lawde.net/pricing).

### `This API key does not have ingest permission.`

- Where: Ingest API response (HTTP 403)
- Code: `FORBIDDEN`
- Message: `This API key does not have ingest permission.`
- What it means: The key is valid but is not allowed to send errors.
- Fix:
  - Use a key that can ingest, or create one in [Settings → API keys](https://www.lawde.net/settings/api-keys).

### `Warning: this does not look like a LAWDE key (they start with lawde_). Continuing; the test error will tell.`

- Where: npx @lawdeshield/cli init output (warning)
- Message: `Warning: this does not look like a LAWDE key (they start with lawde_). Continuing; the test error will tell.`
- What it means: The key you passed, pasted or had in your env file does not start with `lawde_`. The CLI keeps going and the test error shows whether LAWDE accepts it.
- Fix:
  - If the test error then fails, copy the key again from [Settings → API keys](https://www.lawde.net/settings/api-keys), or drop `--key` and approve in the browser.
