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

# Poll for device token

`POST /api/v1/auth/device/token`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/auth/device/token`
- Auth: HTTP bearer

CLI polls this endpoint with device_code until the user approves. Returns 202 while pending, 200 with tokens when approved.

## Request body

- DeviceTokenRequest
  - `deviceCode` string, required

## Response `200`

Authorization granted, tokens returned

## Other responses

- `202`: Authorization pending
- `403`: Authorization denied
- `410`: Code expired

---

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