Skip to navigation

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_namestringRequired1-64 characters

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.

scopeslist of enumsOptional
The scopes the key asks for, default scan.
Allowed values:

Response

The codes to show and poll with.
device_codestring

Send it to POST /v1/keys/token; keep it secret.

user_codestring

The code the person types on the claim page, such as WDJB-MJHT.

verification_uristring
The claim page to send the person to.
verification_uri_completestring
The claim page with the user code filled in.
expires_ininteger
Seconds until the request expires unapproved.
intervalinteger
Seconds to wait between polls.

Errors

400
Bad Request Error
429
Too Many Requests Error
503
Service Unavailable Error