---
title: "Device Authorize"
method: POST
path: "/api/v1/auth/cli/authorize"
tags: ["authentication"]
---

# Device Authorize

`POST /api/v1/auth/cli/authorize`

## Request

- Base URL: `http://127.0.0.1:8052`
- URL: `http://127.0.0.1:8052/api/v1/auth/cli/authorize`
- Auth: none declared

Authorize a device code (called from web dashboard after SSO login).

Requires an authenticated user session.

## Request body

- DeviceAuthorizeRequest: Body for POST /auth/cli/authorize - authorize a device code.
  - `user_code` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `400`: Invalid or expired user code
- `401`: Authentication required
- `404`: SSO authentication is not configured on this server
- `422`: Validation Error

---

[API](https://skmtc.dev/bernstein/apis/bernstein-task-server.md) · [All operations](https://skmtc.dev/bernstein/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc.dev/bernstein/apis/bernstein-task-server/revisions/2a20a34ad2eb?raw)
