---
title: "Poll Device Token"
method: POST
path: "/api/auth/device/token"
tags: ["auth"]
---

# Poll Device Token

`POST /api/auth/device/token`

## 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/token`
- Auth: none declared

Exchanges an approved device code for a CLI token, once.

No auth: the device code is the secret. Answers 400 with
``{"error": ...}`` while the code is pending (``authorization_pending``),
polled too fast (``slow_down``), expired, unknown or already used
(``expired_token``), or denied (``access_denied``).

## Request body

- DeviceTokenRequest: Request schema for the terminal polling for its token.
  - `device_code` string, required

## Response `200`

Successful Response

- unknown

## 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)
