Start a CLI browser login
POST
/auth/device/code
const url = 'https://api.krakenkey.io/auth/device/code';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"clientName":"build-01"}'};
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://api.krakenkey.io/auth/device/code \ --header 'Content-Type: application/json' \ --data '{ "clientName": "build-01" }'Returns a device code for the CLI to poll with and a user code for the user to approve in the dashboard.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
clientName
Shown on the approval page and used in the API key name, e.g. the machine hostname
string
Example
build-01Responses
Section titled “Responses”Device and user codes issued