401 Unauthorized, it means the x-api-key header is either missing entirely or doesn’t match a valid API key on your account.
Sample Responses
Missing API key:How to Resolve
-
Check the header name and casing. The key must be sent in a header literally named
x-api-key— notAuthorization,api-key, or as a query parameter. -
Confirm the key itself is correct. Copy it fresh from your Dashboard rather than reusing a value from an old
.envfile or notes — a single missing character will trigger this error. - Check for accidental whitespace or quotes. A trailing newline or wrapping quotes copied from a config file can silently break the header value.
- Make sure the key belongs to the right workspace. If you’re a member of multiple Teams & Workspaces, confirm you’re using a key generated in the workspace you intend to bill against.
API keys are generated automatically when you create your Geekflare account
and shown on your Dashboard. There is currently no key rotation or multiple-key
support — each account has a single active key.