Device Auth
Create Device Code
Start the device authorization flow
POST
Overview
Initiates the device authorization flow for CLI tools and AI agents that cannot open a browser directly. Returns a user code that must be entered at the verification URL to authorize the device. Flow:- Agent calls this endpoint to get a
device_codeanduser_code - User opens
verification_urlin their browser and enters theuser_code - Agent polls Poll Device Token with the
device_code - Once authorized, the poll returns an API key
Body Parameters
string
default:"Unknown Client"
Name of the client requesting authorization (shown to user during approval)
Response
string
Opaque code for the agent to use when polling for the token
string
Human-readable code in
XXXX-XXXX format for the user to enterstring
URL where the user should enter the code
integer
Seconds until the device code expires (600 = 10 minutes)
integer
Minimum seconds between poll requests (5)
