401 — Missing or invalid API key
1 min read
401 Unauthorized
You get 401 on /v1/* when the key is missing, malformed, or unrecognised.
Messages:
"Manglende eller ugyldig API-nøgle"(Missing or invalid API key)"Ukendt eller deaktiveret API-nøgle."(Unknown or deactivated API key)
Fix:
- Add the header
Authorization: Bearer <key>. - Copy the key again from the dashboard (no whitespace, not truncated).
- Key revoked? Create a new one under Dashboard → API keys.
Bash
curl -H "Authorization: Bearer live_xxx" \
"https://api.danskadresseapi.dk/v1/adresser?q=rådhuspladsen%201%20københavn"/dawa/*needs no key (anonymous up to 1,000 calls/day per IP) — so 401 only hits/v1/*or a wrong pub key (see "403 — Forbidden").
Was this helpful?
