---
title: "Poll a device code for the key. No auth."
method: POST
path: "/api-keys/device-code/poll"
tags: ["API keys"]
---

# Poll a device code for the key. No auth.

`POST /api-keys/device-code/poll`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/api-keys/device-code/poll`
- Auth: none required

Returns { status } — "pending" (keep polling at the advertised interval), "authorized" with a one-time `api_key`, or "denied" / "expired" / "consumed" (stop). The key is handed over exactly once: store it on the first authorized poll.

## Request body

- object
  - `device_code` string, required

## Response `200`

Current status, with the key on the first authorized poll.

- object
  - `status` 'pending' | 'authorized' | 'denied' | 'expired' | 'consumed', required
  - `api_key` string: Present only on the first poll after the human authorizes. Shown once; store it immediately.

---

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