---
title: "Start Device Login"
method: POST
path: "/api/auth/device/code"
tags: ["auth"]
---

# Start Device Login

`POST /api/auth/device/code`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/auth/device/code`
- Auth: none declared

Issues a device code and user code pair for a terminal with no browser.

No auth. The device code is returned once and stored only as a digest.

## Request body

- DeviceCodeRequest: Request schema for starting a device-code login. Both fields are logged only.
  - `client` string, nullable
  - `version` string, nullable

## Response `200`

Successful Response

- DeviceCodeResponse: Response schema for a freshly issued device code (RFC 8628 field names).
  - `device_code` string, required
  - `user_code` string, required
  - `verification_uri` string, required
  - `verification_uri_complete` string, required
  - `expires_in` integer, required
  - `interval` integer, required

## Other responses

- `422`: Validation Error

---

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