Poll a CLI device login
POST
Poll with the device_code from the login request, no more often than interval seconds. Returns 400 with error until the login is approved, then 200 with a new API key that expires after 90 days. The key is returned once: the code is spent and a later poll gets expired_token. No authentication is required.
application/json- body
device_code*stringLength
1 <= length <= 200Request fulfilled, document follows
application/json- response
api_key*stringFormat
passwordcustomer_id*stringFormat
uuidexpires_at*stringFormat
date-timekey_id*stringFormat
uuidcurl -X POST 'https://api.syndai.ai/api/v1/cli/device/token' \ -H 'Content-Type: application/json' \ -d '{ "device_code": "string"}'Example Response
{ "api_key": "pa$$word", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "expires_at": "2019-08-24T14:15:22Z", "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5"}