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

# Device auth API

Understand the browser-based auth flow used by the CLI.

The CLI uses device authorization so a terminal can sign in through a browser.

Most users should call `littledemo login` instead of these endpoints directly.

## Start device flow

```text
POST /api/v1/device/code
```

The response includes a device code, a user code, and verification URLs.

## Poll for token

```text
POST /api/v1/device/token
```

The CLI polls this endpoint until the browser approves the code.

## Browser approval

```text
POST /api/v1/device/authorize
```

This endpoint is called by the browser page after the signed-in user approves the code.

For scripts and CI, use `LITTLEDEMO_API_KEY` instead.