Poll for the result of a CLI login
Asks whether the person has approved yet. No authentication — the
deviceCode is itself the credential.
Poll no faster than the interval returned by /v1/device/start;
polling early returns 429 with reason: "slow_down", and the client
should increase its interval before trying again.
The token is returned exactly once. The first poll after approval
creates the CLI token and returns it; every later poll returns
{"status": "approved"} with no token field. There is no way to
retrieve it again — a client that loses it must start a new login.
Body
required
application/json
- Type: stringdevice
Code requiredThe device code from
/v1/device/start.
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/device/poll
curl https://api.useportal.co/v1/device/poll \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"deviceCode": ""
}'
{
"status": "pending"
}