Skip to main content
POST
Create device code

Body

application/json
callback_url
string

Optional loopback URL where the dashboard sends the browser after the user approves or denies, for a CLI that listens on this computer. It must be http://127.0.0.1:<port>/callback/<nonce> or http://[::1]:<port>/callback/<nonce>, with a port from 1024 to 65535 and a nonce of 22 to 64 letters, digits, - or _, without a query, fragment or user info, and at most 120 characters. After approval the dashboard opens it with an approval_secret query parameter, and the token endpoint only releases the key together with that secret. On deny it adds error=access_denied instead

Example:

"http://127.0.0.1:49152/callback/q0Zr8mWbH1sLx4aPqE6uJ2dFgN7oRtYv"

Response

Default Response

user_code
string
required

The short code to show to the user. The user enters it on the Sevalla dashboard authorize page to approve the request

Example:

"ABCD1234"

device_code
string
required

The secret the client sends to the token endpoint to collect the API key. Keep it in the client and never show it to the user or put it in a URL

Example:

"kT3n9cQ0yVZr8mWbH1sLx4aPqE6uJ2dFgN7oRtYvS5w"

expires_at
string
required

ISO 8601 timestamp when the device code expires. Codes are valid for 5 minutes

Example:

"2025-06-01T12:05:00.000Z"