Poll device login for token
POST
/v1/auth/device/token
const url = 'https://shareout.site/v1/auth/device/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"device_code":"example"}'};
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://shareout.site/v1/auth/device/token \ --header 'Content-Type: application/json' \ --data '{ "device_code": "example" }'Poll with the device_code secret. Returns pending until the browser OAuth step completes, then delivers the so_ token exactly once.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
device_code
required
string
Examplegenerated
{ "device_code": "example"}Responses
Section titled “Responses”Pending or approved
error is the RFC 8628 value (expired_token, access_denied, invalid_grant, invalid_request); code and hint say what happened and what to do next (usually: start a new login).
Media typeapplication/json
object
success
required
boolean
error
required
Human-readable message.
string
code
required
Machine-readable error code.
string
request_id
Correlation id (also the X-Request-Id header). Quote it in support tickets.
string
reason
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
string
hint
What to do next, in plain words.
string
suggestion
string
param
The request field at fault.
string
docs
Doc page for this error.
string
redirect_url
string
support
Present on 5xx — how to reach a human.
object
how
string
include
Array<string>
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}