---
title: "Start RFC8628 device authorization"
method: POST
path: "/auth/device/authorize"
tags: ["OAuth Authentication"]
---

# Start RFC8628 device authorization

`POST /auth/device/authorize`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/auth/device/authorize`
- Auth: none declared

Starts OAuth 2.0 Device Authorization Grant (RFC 8628).
Returns `device_code` for the CLI and `user_code` for browser verification.

By default the returned `verification_uri` / `verification_uri_complete`
point at the project's managed device-approval page served by this API
(`/projects/{projectId}/auth/hosted?action=device&user_code=...&anon_key=...`),
which requires managed auth enabled and a default anon key for the
project.

Projects can override this by setting `device_verification_url` on the
auth config (`PATCH /auth/config`). When set, that URL is returned as-is
with the `user_code` appended (no `action=device` hint and no embedded
anon key — the page brings its own), so a CLI's `login` command surfaces
the project's own RFC 8628 approval page. With a custom URL, device login
does **not** require managed auth to be enabled; the custom page's origin
must be in the project's auth CORS allowlist to call
`POST /auth/device/verify`. Either way the verification page must
authenticate the end user and call `POST /auth/device/verify` with the
`user_code`. See the device-auth guide for both approaches.

## Request body

- object
  - `client_id` string, required: Enabled `device` OAuth client ID for the target project

## Response `200`

Device authorization started

- DeviceAuthorizationResponse
  - `device_code` string, required
  - `user_code` string, required
  - `verification_uri` string, required: Browser verification URL. Points at the project's managed device approval page served by this API: `/projects/{projectId}/auth/hosted?action=device&anon_key=...`. Requires the project to have managed auth enabled and a default anon key. A custom CLI may ignore this and direct users to its own RFC 8628-compatible page instead (see the device-auth guide).
  - `verification_uri_complete` string, required: Same as `verification_uri` but with the `user_code` prefilled (`&user_code=...`). This is the URL most device clients open.
  - `expires_in` integer, required
  - `interval` integer, required

## Other responses

- `400`: Invalid request or unauthorized client

## Changes

- **2026-09-19** `3a6f365f3f35`: 2 breaking, 8 info
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `400`
  - added the optional property `error_description` to the response with the `400` status
  - added the required property `device_code` to the response with the `200` status
  - …6 more
- **2026-08-27** `bb44e98aba2e`: 9 breaking, 1 warning
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `400`
  - removed the required property `device_code` from the response with the `200` status
  - removed the required property `error` from the response with the `400` status
  - …6 more

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/auth/device/authorize/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
