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

# Device Token

`POST /v1/auth/device/token`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/auth/device/token`
- Auth: none declared

PUBLIC, polled by the CLI. While the user hasn't approved -> 400
"authorization_pending". Once approved -> the access token + a refresh token IN
THE BODY (one-shot: the device_code is consumed). On expiry -> 400 "expired_token".

## Request body

- DeviceTokenIn
  - `device_code` string, required

## Response `200`

Successful Response

- AppRoutesAuthTokenOut
  - `access_token` string, required
  - `token_type` string
  - `expires_at` string, date-time, required
  - `refresh_token` string, nullable

## Other responses

- `422`: Validation Error

---

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