# missing_permission

> The CLI token lacks the permission the command needs, such as `publish` for the game or `test_rooms`.

| | |
| --- | --- |
| Kind | `disko` command error |
| `disko` exit code | 3 (auth) |

A CLI token carries a fixed set of permissions. When the token in use
(`DISKO_TOKEN`, or one stored by `disko login --with-token`) lacks the one a
command needs, the command fails with `missing_permission`, names the
permission and exits with code 3. Browser sign-in never reports this code.

- `disko publish` reports it when the game exists but the token has no
  `publish` permission for it or for all games.
- `disko dev` reports it when disko-master refuses to create a test room for
  the token. disko-master gives the same answer for a token that is invalid,
  expired or revoked, so the message names both causes.

## Fix

Create a CLI token with the permission in the Creator Portal: `publish` for this
game (or all games), or `test_rooms` for `disko dev`. Then either set
`DISKO_TOKEN` to it, or pipe it to `disko login --with-token`:

```sh
echo "$TOKEN" | npx disko login --with-token
```

To use browser sign-in instead, unset `DISKO_TOKEN` and run `disko logout`.

## See also

- [CLI tokens & CI](/registry/cli-tokens)
- [not_found](/errors/not_found)
- [unauthorized](/errors/unauthorized)
