On this page

API

invalid_token

HTTP 401. Invalid token

What it means

The token is malformed, unknown or revoked.

What to do

Check that you copied the whole secret (it starts with rf_) and that it was not revoked. A token is shown once when it is created; if you lost it, make a new one. The response carries WWW-Authenticate with error="invalid_token".

Retrying

Do not retry the same request. Change it first.

Example

json
{
  "type": "https://reuseforge.com/docs/api/errors/invalid_token",
  "title": "Invalid token",
  "status": 401,
  "detail": "The token is not valid.",
  "instance": "/api/v1/items/acme/invoice-extractor",
  "code": "invalid_token",
  "request_id": "req_c4v8n2m6x1z3"
}

Every error is application/problem+json (RFC 9457). Branch on code, show detail to people and quote request_id when you ask for help. See the error catalogue.