API tokens
PreviewCollect 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
application/json- body
deviceCode*stringLength
length <= 200Where the sign-in stands.
application/json- response
status*stringslow_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*integerSeconds the client must wait before it asks again.
token?stringThe API token's secret, once, when approved.
orgId?stringThe organization the token is for, when approved.
tokenId?stringThe API token's id, when approved.
Format
uuidcurl -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"}