---
title: "Start a CLI device login (no auth)"
method: POST
path: "/v1/cli-auth/device"
tags: ["Account"]
---

# Start a CLI device login (no auth)

`POST /v1/cli-auth/device`

## Request

- Base URL: `https://api.openrelay.inc`
- URL: `https://api.openrelay.inc/v1/cli-auth/device`
- Auth: none required

Starts the orl auth login device flow: returns a device code for the CLI to poll and a 6-digit user code for a signed-in person to confirm.
No API key or session is required: this is how an unauthenticated CLI starts the flow that gets it one. The code expires in 10 minutes. deviceName is the requesting host's best-effort hostname, shown on the approval page so the signed-in user can recognize their own terminal before confirming the code.

Requires no authentication.

## Request body

- object
  - `deviceName` string

## Response `200`

A fresh device/user code pair

- object
  - `deviceCode` string, required: Opaque; the CLI polls POST /v1/cli-auth/token with this.
  - `expiresIn` integer, required: Seconds until the code expires (600).
  - `interval` integer, required: Minimum seconds between polls; a faster poll gets slow_down.
  - `userCode` string, required: The 6 digits the CLI prints for a human to enter.
  - `verificationUri` string, uri, required
  - `verificationUriComplete` string, uri, required: verificationUri with ?code= pre-filled; the approval page still requires the user to confirm it matches their terminal.

## Other responses

- `429`: The request is invalid

## Changes

- **2026-10-26** `7fe59d94a9f5`: 1 info
  - added the optional property `requestId` to the response with the `429` status
- **2026-10-21** `dc9750cb25b5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openrelay/apis/openrelay-api/changes/v1/cli-auth/device/post.md)

---

[API](https://skmtc.dev/openrelay/apis/openrelay-api.md) - [All operations](https://skmtc.dev/openrelay/apis/openrelay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openrelay/apis/openrelay-api/revisions/7fe59d94a9f5?raw)
