Skip to content
einvoicing.dev

Problems·HTTP 401

unauthenticated

No valid API key was presented.

What it means

The request had no API key, or its key is malformed, unknown, revoked or expired. The answer is the same in every case, on purpose: telling them apart would tell whoever holds a stolen key which it is.

What to do

Send the key as Authorization: Bearer <key> or in X-API-Key. einvoicing whoami checks the key the CLI is using. If every key is lost, signing in again with your email adds a new one.

Example

Sent as application/problem+json (RFC 9457). Branch on type, which is stable. Never branch on title or detail, which are prose and may change.

Exampleapplication/problem+json
{  "type": "https://www.einvoicing.dev/problems/unauthenticated",  "title": "No valid API key was presented.",  "status": 401,  "detail": ""}

Returned by

All problem types

Every error the API can return, with what to do about each.

API reference

Every operation, its parameters and the errors it can answer with.