API tokens
Preview

Start a command-line sign-in

The command line asks for a device code: a long secret it polls with (`POST /device-tokens`) and a short code,

POST
/device-codes
application/json
  1. body
clientName*string

What the person is shown, such as the machine's name.

Length1 <= length <= 64

Response Body

The codes.

application/json
  1. response
deviceCode*string

The secret the client polls with. Shown once.

userCode*string

The short code a person approves, such as WDJK-4M2P.

verificationUri?string

The web app's page to open. Absent when the server does not know the web app's address.

expiresAt*string
Formatdate-time
interval*integer

Seconds between polls.

Example Request
curl -X POST 'https://wardn.example.com/api/v1/device-codes' \  -H 'Content-Type: application/json' \  -d '{  "clientName": "string"}'
Example Response
{  "deviceCode": "string",  "userCode": "string",  "verificationUri": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "interval": 0}