ChartnautDocs

Finish a browser sign-in

POST/auth/token
Base URL
https://api.chartnaut.com/v1
Auth
None
Operation ID
pollDeviceLogin

Until approved: 400 with authorization_pending (keep polling), slow_down (add 2 s to the interval), access_denied or expired_token (stop). Approved: 200 with a key named "CLI on <client_name>", created at this moment and returned once. The key expires at expires_at: the expires_in_days asked for, or less if the approver shortened it. After that every call answers 401 unauthorized ("API token expired.").

Request bodyapplication/json#

object
device_codestringRequired

Responses#

200OKapplication/json

Approved.

object
tokenstring
namestring
expires_atstring (date-time)

When the key stops working (RFC 3339).

expires_in_daysinteger

The key's lifetime in days.

One of 7 30 90
ErrorAny other statusapplication/json

Error.

object · Error
errorobjectRequired
Show fields
codestringRequired

Stable. Branch on this, never on message.

One of unauthorized forbidden_scope plan_limit not_found version_conflict script_invalid in_use out_of_coverage unknown_instrument ambiguous_instrument unsupported_timeframe run_not_finished rate_limited busy invalid_request forbidden conflict not_in_library confirmation_required not_shared not_installable not_implemented authorization_pending slow_down access_denied expired_token internal
messagestringRequired
detailsobject
docs_urlstring (uri)
request_idstring