Exchange a CLI sign-in code
POST
/api/v1/auth/cli/token
const url = 'https://example.com/api/v1/auth/cli/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"device_code":"example","verifier":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/auth/cli/token \ --header 'Content-Type: application/json' \ --data '{ "device_code": "example", "verifier": "example" }'Exchanges a CLI sign-in code. The request needs the device code and proof key from CLI sign-in. A signed-in User is not needed. It can return 429 if the request limit is reached. Route: /api/v1/auth/cli/token. Inputs: . Do not automatically replay this operation after an uncertain result.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
device_code
required
string
verifier
required
string
Examplegenerated
{ "device_code": "example", "verifier": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
bearer_token
string | null
status
required
string
Examplegenerated
{ "bearer_token": "example", "status": "example"}Media typeapplication/json
object
bearer_token
string | null
status
required
string
Examplegenerated
{ "bearer_token": "example", "status": "example"}Media typeapplication/json
object
code
required
string
message
required
string
Examplegenerated
{ "code": "example", "message": "example"}