---
search:
  tags:
    - Account
    - POST
seo:
  description: >-
    Starts a login for a device with no browser, such as the CLI. Show the
    person userCode… Reference for the POST /_luna/auth/device endpoint in the
    Luna API.
sidebar:
  label: Start a device login
  badge: POST
title: Start a device login
type: openapi-operation
---
Starts a login for a device with no browser, such as the CLI. Show the person `userCode` and send them to `verificationPath`, then poll for the key. No credential is needed.

`POST /_luna/auth/device`

**Request body** (`application/json`, required)

- `client` (string) — A name for the device that is logging in, shown on the approval page.

Request body example:

```json
{
  "client": ""
}
```

**Responses**

- `200` — The codes for this login.
- `default` — The request failed. The status says how and \`error.message\` says why.

Response example, 200:

```json
{
  "deviceCode": "string",
  "userCode": "string",
  "verificationPath": "string",
  "expiresIn": 0,
  "interval": 0
}
```
