Start the device flow
POST
/api/v1/oauth/device
const url = 'http://localhost:3000/api/v1/oauth/device';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/oauth/deviceRFC 8628, with a registered client_id, form-encoded (or JSON). A person approves user_code at verification_uri; poll the token endpoint meanwhile. scope (read, propose or write) is what the consent screen offers first, never more than the person may give; without it, propose. artbucket login asks for propose unless --scope says otherwise.
No key needed.
Responses
Section titled “Responses”Codes
Media typeapplication/json
object
device_code
required
string
user_code
required
string
verification_uri
required
string
verification_uri_complete
required
string
expires_in
required
number
interval
required
number
Examplegenerated
{ "device_code": "example", "user_code": "example", "verification_uri": "example", "verification_uri_complete": "example", "expires_in": 1, "interval": 1}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}