Skip to content
lexratesAccount

API · problem · HTTP 401

That key is not valid

This page is what the type field of the error points at. Every answer this API refuses carries one, and it is a stable address rather than a version of the docs.

The refusalinvalid-key
When it happens
A credential was presented and cannot be read, or is not a key this service knows. Sending an unreadable Authorization header counts: it is never treated as an anonymous request.
What to do
Use Authorization: Bearer <key>, or omit the credential entirely for the open tier. ?key= also works and is the weaker form — it travels into logs, history and cache keys.
The shape of the answerRFC 9457

Problem details: type, title, status and detail, plus whatever the individual failure can usefully add. The detail is written for the person reading the log, and names the parameter or the id that caused it.

The fields every problem carries
typeThis page’s address. Stable.
titleThat key is not valid
status401
detailWhat went wrong, in this request.

The full list of failures, with the schema, is in the API documentation.