API tokens
Preview

Collect the token of a command-line sign-in

Answers `pending` until a person approves or denies. The approved answer carries the API token's secret once:

POST
/device-tokens
application/json
  1. body
deviceCode*string
Lengthlength <= 200

Response Body

Where the sign-in stands.

application/json
  1. response
status*string

slow_down means the client asked before its interval had passed (RFC 8628 3.5); it must wait the longer interval given here from now on.

Value in"pending""approved""denied""used""expired""slow_down"
interval*integer

Seconds the client must wait before it asks again.

token?string

The API token's secret, once, when approved.

orgId?string

The organization the token is for, when approved.

tokenId?string

The API token's id, when approved.

Formatuuid
Example Request
curl -X POST 'https://wardn.example.com/api/v1/device-tokens' \  -H 'Content-Type: application/json' \  -d '{  "deviceCode": "string"}'
Example Response
{  "status": "pending",  "interval": 0,  "token": "string",  "orgId": "string",  "tokenId": "07dfef4c-e677-4ce6-87a3-cd348338445f"}