Device Decision
POST
/api/v1/oauth/device/decision
const url = 'https://example.com/api/v1/oauth/device/decision';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"user_code":"example","approve":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/oauth/device/decision \ --header 'Content-Type: application/json' \ --data '{ "user_code": "example", "approve": true }'Approve/deny a device flow after the broker consents in the portal. The principal (and brokerage the token is scoped to) comes from the authenticated broker session, never the client. Scope is capped by the brokerage’s programmatic-access controls, same as the browser flow.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
DeviceDecision
object
user_code
required
User Code
string
approve
Approve
boolean
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}