# forbidden

HTTP 403 · `code`: `forbidden` · `title`: Forbidden

The key is valid but may not do this: it lacks the scope the operation needs (the only check for a service account’s key), its owner is a member whose role no longer holds that permission, its owner is no longer an active member of the organisation or no longer holds API access, the organisation has turned API keys off (`detail` says so), or the organisation requires single sign-on for the owner and has not allowed keys for SSO-managed members.

## 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

Create a key with the scope (for a service account’s key, issue a new key that carries it), ask an Admin to grant the member’s role the permission, or ask an Admin to switch on **Allow members to use API keys** or **Allow API keys for SSO-managed members** on **Organisation → Settings → Authentication**. Retrying the same key cannot succeed until that changes.

## This page's address

The API's answer names this page in `type` as `https://docs.watchtower15.com/api/errors/forbidden/`, 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 (403 Forbidden)**

```http
HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
X-Request-Id: 4d1e8b7a-2c9f-4a3e-b6d5-7f0c1a2e3b4d

{
  "type": "https://docs.watchtower15.com/api/errors/forbidden/",
  "title": "Forbidden",
  "status": 403,
  "code": "forbidden",
  "detail": "This key does not have the domains.edit scope",
  "request_id": "4d1e8b7a-2c9f-4a3e-b6d5-7f0c1a2e3b4d"
}
```

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