Begin a device-authorization (browser-login) flow.
Unauthenticated — the client calls this before it has any credentials. Returns a high-entropy `deviceCode` the client keeps secret and echoes back on every poll, a short human-readable `userCode`, and the URL it should open in the user's browser (the URL carries the `userCode`, never the device code). Grant expires in 10 minutes.
The preset the client wants the minted key scoped to
(REQUIRED — there is no server-side default), plus optional client
identity (clientType / clientName) and device identity
(deviceId / deviceLabel) so a re-login from the same
machine rotates its credential in place.
What kind of client is starting the flow (CLI / IDE / desktop / MCP). Drives the approval-page copy and the minted token's display name. Defaults to Fruxon.Model.DeviceAuth.ClientType.Unspecified (treated as CLI) when the client doesn't send it.
"UNSPECIFIED" | "CLI" | "IDE" | "DESKTOP" | "MCP" | "OTHER"Optional human-readable client name (e.g. "Fruxon CLI 0.4.1",
"VS Code"). Display/attribution only. Null when not provided.
Stable per-install device id (a UUID the client generates once and persists). Null when the client doesn't send it.
Human-readable device label (e.g. hostname), best-effort. Attribution only — never gates anything. Null when not provided.
Named preset the client wants the minted key scoped to — one of
observer, operator, developer, maintainer,
admin. REQUIRED: the client knows what access it needs and must
say so — there is no server-side default. The user's role at the
approval page is to see it and approve/deny, not to choose (the
GitHub device-flow model).
Response Body
curl -X POST "https://api.fruxon.com/v1/deviceAuthorizations" \ -H "Content-Type: application/json" \ -d '{}'{
"deviceCode": "string",
"userCode": "string",
"verificationUri": "string",
"verificationUriComplete": "string",
"expiresInSeconds": 0,
"pollIntervalSeconds": 0
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}