# unauthorized

HTTP 401 · `code`: `unauthorized` · `title`: Unauthorized

The key is missing, malformed, unknown, expired or revoked, or the credential is not an API key (a console sign-in token is not one). The answer does not say which, on purpose.

## What the answer carries

Every [problem document](https://developer.watchtower15.com/api/errors/) carries `type`, `title`, `status`, `code`, `detail` and `request_id`. This code adds nothing to them.

## What to do

Send `Authorization: Bearer wt15ak_…`. If you did, the key may have expired or been revoked: check the **API Keys** tab of your **Profile** and create a new one if needed (see [authentication and keys](https://developer.watchtower15.com/api/authentication/)). Do not retry in a loop: repeated failed attempts are throttled with a `429`.

## This page's address

The API's answer names this page in `type` as `https://docs.watchtower15.com/api/errors/unauthorized/`, an identifier that never changes within `v1`. That address answers with a permanent redirect to this page, so a link in a log still opens it, and a client comparing `type` as a string never breaks.

**Response (401 Unauthorized)**

```http
HTTP/1.1 401 Unauthorized
Content-Type: application/problem+json
WWW-Authenticate: Bearer
X-Request-Id: 4d1e8b7a-2c9f-4a3e-b6d5-7f0c1a2e3b4d

{
  "type": "https://docs.watchtower15.com/api/errors/unauthorized/",
  "title": "Unauthorized",
  "status": 401,
  "code": "unauthorized",
  "detail": "The API key is missing, malformed, expired or revoked",
  "request_id": "4d1e8b7a-2c9f-4a3e-b6d5-7f0c1a2e3b4d"
}
```

Source: https://developer.watchtower15.com/api/errors/unauthorized/
