Skip to main content
Device authorization is a three-party dance: the CLI requests a code, the user confirms it in a browser, the CLI polls until the token arrives.

POST /device/code

Called by the CLI to start a login. No authentication.
The CLI shows userCode, opens verificationUri, and polls /device/token every interval seconds until the code expires.

POST /device/token

Polled by the CLI with the deviceCode.
The returned token is the lifetime device token. Store it securely; it never appears again.

POST /device/approve

Panel-session endpoint — called by the browser page at /device, not with a device token.
orgName is only sent when the user has no organization yet — approval then creates a team org on the spot. The organization chosen here becomes the device’s home org.