Authentication

post/auth/cli/device/start

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/auth/cli/device/start
  • Auth: none declared

Request body

client_namestring nullable

Friendly hostname / client identifier shown in the browser approval screen. Sanitized before display.

Example request

{
  "client_name": "dviejo-mac.local"
}

Response

Device session created

device_codestring required

Opaque secret the CLI polls with. Never display to a human.

expires_ininteger required

Seconds until the device_code expires.

intervalinteger required

Suggested polling interval, in seconds.

user_codestring required

Short human-readable code the user types into the browser.

verification_uristring required

Base verification URL — the CLI may display this when the pre-filled URL is too long to be useful.

verification_uri_completestring required

verification_uri with user_code pre-filled. Open this directly.

Example response

{
  "user_code": "ABCD-1234",
  "verification_uri": "https://temps.example.com/cli-login",
  "verification_uri_complete": "https://temps.example.com/cli-login/ABCD-1234"
}

Changes

No recorded changes to this operation across all 50 revisions of this API.