Start a sign-in
/auth/deviceStarts a browser sign-in and returns the codes to show and poll with. It is the first half of the sign-in behind chartnaut login: the person approves in Chartnaut, and Poll a sign-in hands your program a new API key.
Scope | Heavy call | Long poll | CLI |
|---|---|---|---|
None, no key | No | No |
|
Guidance
The flow: call this, show the person
user_codeand openverification_uri_completein their browser, then call Poll a sign-in everyintervalseconds until it answers200with the key.Ask the person to check that the code on the approval page matches the one you showed. Anyone who approves a code they did not start signs that program in to their account.
The sign-in lasts
expires_inseconds, 600. After that, start a new one.client_namenames the machine on the approval page and in the key's name, so the person can recognise and revoke it later on the Developers page.It takes no key and does not count toward any account's requests a minute. It is limited to 30 calls a minute from one IP address.
A
503 busymeans browser sign-in is unavailable. Make a key on the Developers page instead.
Request body
Optional. Up to 4 KB; a body that is not JSON is treated as empty.
Field | Type | Required | Description |
|---|---|---|---|
| string | No | Names the machine. Shown on the approval page and in the new key's name. Control characters are removed, it is cut to 60 characters, and an empty one becomes unknown machine |
Response
200 with:
Field | Type | Description |
|---|---|---|
| string | 64 hex characters. Keep it secret; poll with it |
| string | Eight letters in two groups, such as |
| string | The approval page, |
| string | The approval page with the code filled in. Open this one |
| integer | Seconds until the sign-in expires: 600 |
| integer | Seconds to wait between polls: 3 |
Status codes
Status | Code | Meaning |
|---|---|---|
| - | The sign-in started |
|
| More than 30 starts in a minute from your IP address |
|
| Browser sign-in is unavailable. Use a key made on the Developers page |
|
| The sign-in could not be started. Retry |
