---
title: "Cli Auth Poll"
method: POST
path: "/v1/auth/cli/poll"
tags: ["v1"]
---

# Cli Auth Poll

`POST /v1/auth/cli/poll`

## Request

- Base URL: `https://api.ellipsis.dev`
- URL: `https://api.ellipsis.dev/v1/auth/cli/poll`
- Auth: none declared

Poll a device-code auth flow for its token.

Unauthenticated; the device code identifies the flow.

## Request body

- CliAuthPollRequest: A device-flow poll from the CLI.
  - `device_code` string, required: The device code returned by POST /v1/auth/cli/start.

## Response `200`

Successful Response

- PollCliAuthResponse: The state of a device-code flow. Poll until `status` leaves `pending`.
  - `access_token` string, nullable: The user token, present only on the single `approved` response. Store it; it cannot be fetched again.
  - `status` string, required: pending (keep polling) | approved (access_token is present, exactly once) | denied | expired | already_claimed (the token was already handed out).

## Other responses

- `401`: The bearer token is missing, invalid, or revoked.
- `403`: The credential may not perform this action, or the account is blocked.
- `404`: Unknown device code.
- `422`: Validation Error

---

[API](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api.md) - [All operations](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/revisions/344b16df9a1a?raw)
