Skip to main content
POST
Request Device Code

Body

application/x-www-form-urlencoded

The input parameters required for requesting a device code.

client_id
string
required

Your client ID for the environment you want to manage, found in the Knot Dashboard. Never send your secret.

Example:

"9f3c2a1e-6b7d-4e8f-a2c4-5d6e7f8a9b0c"

scope
string
required

Space-delimited list of scopes to request. At least one is required.

Example:

"webhooks:read webhooks:write"

Response

Successful request.

device_code
string

Code to exchange for an access token. Do not show it to the user.

Example:

"def50200a1b2c3d4e5f6"

user_code
string

Code for the user to enter in the Knot Dashboard. Eight letters; a hyphen is optional.

Example:

"WDJBMJHT"

verification_uri
string

URL where the user approves the request.

Example:

"https://api.dashboard.knotapi.com/oauth/device"

verification_uri_complete
string

The verification_uri with the user_code. The approval page still asks the user to enter the code.

Example:

"https://api.dashboard.knotapi.com/oauth/device?user_code=WDJBMJHT"

expires_in
integer

Seconds until the device_code and user_code expire.

Example:

600

interval
integer

Minimum seconds to wait between polling requests.

Example:

5