---
title: "Poll a CLI sign-in"
method: POST
path: "/cli/login/token"
tags: ["CliLogin"]
---

# Poll a CLI sign-in

`POST /cli/login/token`

## Request

- Base URL: `https://api.supersendtx.com`
- URL: `https://api.supersendtx.com/cli/login/token`
- Auth: none required

The CLI's poll. `pending` until the person decides; `denied` if they
canceled; `expired` after ten minutes or once the key was handed out.
`approved` returns a new API key for the workspace they picked, once.

## Request body

- object
  - `device_code` string, required

## Response `200`

Current status, with the key when approved

- CliLoginPoll
  - `status` 'pending' | 'approved' | 'denied' | 'expired', required
  - `api_key` string: Only when `approved`, and only once. A full-scope key for the workspace the person picked.
  - `key` object
    - `id` string
    - `name` string
    - `prefix` string
  - `user` object
    - `id` string
    - `email` string
  - `workspace` object
    - `id` string
    - `name` string

## Other responses

- `400`: Missing or malformed device code
- `429`: Polling too fast

---

[API](https://skmtc.dev/ranla/apis/supersend-tx-api.md) · [All operations](https://skmtc.dev/ranla/apis/supersend-tx-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ranla/apis/supersend-tx-api/revisions/e3e782652f50?raw)
