Start a device authorization
POST
/auth/device/start
const url = 'https://api.loomta.com/auth/device/start';const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};
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.loomta.com/auth/device/start \ --header 'Content-Type: application/json' \ --data '{}'Begins the RFC 8628 device flow. No authentication is required — the returned device_code is itself the secret. Display user_code and send the user to verification_uri, then poll /auth/device/token.
Request Body
Section titled “Request Body”Media typeapplication/json
object
Examplegenerated
{}Responses
Section titled “Responses”The device and user codes.
Media typeapplication/json
object
device_code
Secret. Used to poll for the key.
string
user_code
string
verification_uri
string format: uri
verification_uri_complete
string format: uri
interval
Seconds to wait between polls.
integer
expires_in
Seconds until the codes expire.
integer
Example
{ "user_code": "LMT-7QX2-9KFP", "verification_uri": "https://loomta.com/cli-auth", "verification_uri_complete": "https://loomta.com/cli-auth?code=LMT-7QX2-9KFP", "interval": 5, "expires_in": 600}