---
title: "Review a CLI login request"
method: GET
path: "/auth/cli/device"
tags: ["Identity"]
---

# Review a CLI login request

`GET /auth/cli/device`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/auth/cli/device`
- Auth: API key in cookie `pyai_session`

## Query parameters

- `user_code` string, required

## Response `200`

Consent details; never contains a device secret or an API key.

- object
  - `user_code` string, required
  - `client_name` 'PyAI CLI', required
  - `status` 'pending' | 'approved' | 'denied' | 'consumed', required
  - `expires_at` integer, required: Unix milliseconds.
  - `scopes` string[], required
  - `credential_ttl_seconds` unknown, required

## Other responses

- `400`: CLI login error. Branch on the final component of the problem type URI.
- `401`: CLI login error. Branch on the final component of the problem type URI.
- `429`: CLI login error. Branch on the final component of the problem type URI.

---

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