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) or run npx @lawdeshield/cli init again.
Plain-text copy for AI assistants: /docs/troubleshooting/api-keys.md
Messages
Missing API key. Provide x-lawde-api-key or Authorization: Bearer <key>.
Where: Ingest API response (HTTP 401) · Code: Unauthorized
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
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. - 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
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.
This API key does not have ingest permission.
Where: Ingest API response (HTTP 403) · Code: FORBIDDEN
What it means: The key is valid but is not allowed to send errors.
Fix:
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)
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, or drop
--key and approve in the browser.