---
title: "Poll a device_code until the user approves"
method: POST
path: "/api/pair/poll"
---

# Poll a device_code until the user approves

`POST /api/pair/poll`

## Request

- Base URL: `https://charm.ing`
- URL: `https://charm.ing/api/pair/poll`
- Auth: none declared

Plaintext `chrm_user_*` token is returned exactly once when status flips to `approved`. Subsequent polls return `approved` with `already_delivered: true` and no token. The legacy `/pair/poll` path 308s here.

## Request body

- object
  - `device_code` string, required

## Response `200`

Poll result

- PairPollResponse: Poll result for a previously-minted device_code. `token` is delivered exactly once.
  - `status` 'pending' | 'expired' | 'approved', required
  - `token` string: Only on the first poll after approval. `chrm_user_*` plaintext, irrecoverable.
  - `tokenPrefix` string
  - `already_delivered` boolean

## Other responses

- `400`: Body is not JSON or `device_code` is missing.
- `429`: Rate limited (per-IP / per-device_code).

---

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