---
title: "Device Code Request"
method: POST
path: "/auth/cli/device"
tags: ["authentication"]
---

# Device Code Request

`POST /auth/cli/device`

Initiate device authorization flow for CLI login.

The CLI calls this to get a device_code and user_code.
The user enters the user_code in the web dashboard after SSO login
to authorize the CLI session.

## Request body

- DeviceCodeRequest — Body for POST /auth/cli/device - initiate device auth flow.
  - `client_name` string

## Response `200`

Successful Response

- DeviceCodeResponse — Response for device code request.
  - `device_code` string, required
  - `user_code` string, required
  - `verification_uri` string, required
  - `expires_in` integer, required
  - `interval` integer, required

## Other responses

- `404` — SSO authentication is not configured on this server
- `422` — Validation Error

---

[API](https://skmtc.net/sipyourdrink-ltd/apis/bernstein-task-server.md) · [All operations](https://skmtc.net/sipyourdrink-ltd/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sipyourdrink-ltd/bernstein-task-server/versions/86f514b4e920/schema)
