> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kernelmedia.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# Users

> Library access and Live TV permissions

All endpoints need an [admin token](https://docs.kernelmedia.tv/api-reference/admin/overview.md#authentication).

## List users

`GET /api/admin/users`

```json theme={null}
{
  "users": [
    {
      "id": "<uuid>",
      "username": "alex",
      "admin": false,
      "active": true,
      "all_libraries_access": false,
      "library_ids": ["<library-id>"],
      "live_tv_access": true,
      "live_tv_max_connections": 2
    }
  ]
}
```

## Library access

`PUT /api/admin/users/{userId}/libraries`

**all\_libraries\_access** `boolean`

Give access to every library, including ones added later

**library\_ids** `string[]`

Libraries the user can see when `all_libraries_access` is false

## Live TV permissions

`PUT /api/admin/users/{userId}/permissions` <sup>New in 0.9.0</sup>

**live\_tv\_access** `boolean`

Whether the user can watch Live TV

**live\_tv\_max\_connections** `integer`

Most Live TV streams the user can have open at once. `0` means unlimited.

Limits are enforced when a stream starts.

```bash theme={null}
curl -X PUT http://<server>:9014/api/admin/users/<userId>/permissions \
  -H "Authorization: Bearer <admin-jwt>" \
  -H "Content-Type: application/json" \
  -d '{"live_tv_access": true, "live_tv_max_connections": 2}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.