Identity

Start browser login for the CLI

Creates a ten-minute device grant bound to the CLI's S256 verifier. Open verification_uri_complete in a browser, compare its user code with the terminal, then approve. The grant is rate limited per source network; no API key is required. Responses must not be cached.

post/auth/cli/device

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/auth/cli/device
  • Auth: none required

Request body

code_challengestring required
code_challenge_method'S256' required
client_name'PyAI CLI' required

Response

Device grant created. Keep device_code and the verifier private; only user_code belongs in the browser URL.

device_codestring required
user_codestring required
verification_uristring uri required
verification_uri_completestring uri required
expires_inunknown required
intervalunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.