---
title: "POST /auth/cli/device/poll"
method: POST
path: "/auth/cli/device/poll"
tags: ["Authentication"]
---

# POST /auth/cli/device/poll

`POST /auth/cli/device/poll`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/auth/cli/device/poll`
- Auth: none declared

## Request body

- CliDevicePollRequest
  - `device_code` string, required

## Response `200`

Poll result; check `status` field

- union
  - object: Still waiting on the user to approve in the browser.
    - `status` 'authorization_pending', required
  - object: CLI is polling faster than the server-suggested interval.
    - `status` 'slow_down', required
  - object: User denied the request in the browser.
    - `status` 'access_denied', required
  - object: The session has expired without approval.
    - `status` 'expired_token', required
  - object: The session was approved; this is the only response that carries the API key. The key is returned exactly once and then cleared from the session row.
    - `api_key` string, required
    - `email` string, required
    - `expires_at` string, date-time, nullable
    - `key_prefix` string, required
    - `role` string, required
    - `status` 'approved', required
    - `user_id` integer, required

## Other responses

- `404`: Unknown device_code
- `500`: Internal server error

## Changes

- **2026-05-30** `b72341d12f63`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/auth/cli/device/poll/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
