Collect a CLI sign-in's token
/v1/cli/device/tokenPoll this with the device code from /v1/cli/device/code every interval seconds. Until the developer decides, it answers authorization_pending. Once they approve, it returns a device token, exactly once.
Answers in OAuth's own shape (RFC 6749 section 5, RFC 8628 section 3.5), not the Varis error envelope, so any device-flow client reads it. Stop polling on access_denied, expired_token, or invalid_grant.
Unauthenticated: the device code is the credential.
Body
application/jsondevice_codestringrequiredResponse
application/jsonApproved. Store the token; it is never shown again.
access_tokenstringrequiredThe device token. Send it as Authorization: Bearer on management requests. Store it outside the repository; the CLI keeps it in ~/.config/varis/credentials.toml.
token_typestringrequiredexpires_inintegerrequiredSeconds until the token expires if unused: 180 days. Every request that uses it pushes the expiry forward.
request_idstringrequiredcurl -X POST 'https://api.usevaris.com/v1/cli/device/token' \ -H 'Content-Type: application/json' \ -d '{ "device_code": "string"}'{ "access_token": "string", "token_type": "Bearer", "expires_in": 0, "request_id": "string"}