Ask a person for an API key
For an agent without a key (RFC 8628 device flow). Show the person user_code and verification_uri, then poll POST /v1/keys/token every interval seconds. Once they approve on the claim page, the poll returns a key on their account.
Request
This endpoint expects an object.
client_name
Your agent’s name, shown to the person approving the key and kept in the key’s name. 1 to 64 ASCII letters, digits, spaces or ._()/:@+-, starting with a letter or digit.
scopes
The scopes the key asks for, default scan.
Allowed values:
Response
The codes to show and poll with.
device_code
Send it to POST /v1/keys/token; keep it secret.
user_code
The code the person types on the claim page, such as WDJB-MJHT.
verification_uri
The claim page to send the person to.
verification_uri_complete
The claim page with the user code filled in.
expires_in
Seconds until the request expires unapproved.
interval
Seconds to wait between polls.
Errors
400
Bad Request Error
429
Too Many Requests Error
503
Service Unavailable Error