Skip to content
ProductBlogOpen console
API

Initialize a device-authorization flow (RFC 8628)

POST
/auth/cli/device
curl --request POST \
--url https://mw.omazy.ai/api/v1/auth/cli/device \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=example \
--data scope=example \
--data install_id=example \
--data install_name=example

Returns user_code + device_code pair. The user enters the user_code at the verification_uri to authorize. The CLI polls /token with the device_code.

Media typeapplication/x-www-form-urlencoded
object
client_id
required

Must be ‘omazy-cli’

string
scope

Space-separated scopes

string
install_id
required

Stable identifier for the machine or integration being authorised

string
install_name

Human-readable label shown in the installs list

string
Examplegenerated
client_id=example&scope=example&install_id=example&install_name=example

OK

Media typeapplication/json
object
device_code
string
expires_in
integer
interval
integer
user_code
string
verification_uri
string
verification_uri_complete
string
Examplegenerated
{
"device_code": "example",
"expires_in": 1,
"interval": 1,
"user_code": "example",
"verification_uri": "example",
"verification_uri_complete": "example"
}

Bad Request

Media typeapplication/json
object
error
string
error_description
string
Examplegenerated
{
"error": "example",
"error_description": "example"
}