Skip to Content
Sign in

Get a Device sign-in

What the approval page shows. Opening a code binds it to this browser (cookie `ql_signin`); another browser gets 409 opened_elsewhere and counts as a view, and after 5 views the code locks (status locked). Call it once when the page opens; the bound browser may call it again without counting. Send `prefilled=true` when the page took the code from the link's fragment: such a code can be approved for 5 minutes after the Device asked (`expires_at`), a typed one for 10. `requested_from.ip` is shown only when the browser is on the same network as the Device; otherwise only the country (when the proxy in front reports it). `one_click` true: show Approve without the warning. Otherwise, with a `loopback_port`, fetch the proof (`GET http://127.0.0.1:<loopback_port>/tiltas/sign-in-proof` → `{"nonce"}`) and send it as `loopback_nonce`; failing that show the warning, send `confirm_different_network`, and if `session_fresh` is false send the person through sign-in again first (`return_to=/connect#code=…`). 409 partner_sign_in for a Partner sign-in.

GET
/device-sign-ins/{user_code}

What the approval page shows. Opening a code binds it to this browser (cookie ql_signin); another browser gets 409 opened_elsewhere and counts as a view, and after 5 views the code locks (status locked).

Call it once when the page opens; the bound browser may call it again without counting. Send prefilled=true when the page took the code from the link's fragment: such a code can be approved for 5 minutes after the Device asked (expires_at), a typed one for 10. requested_from.ip is shown only when the browser is on the same network as the Device; otherwise only the country (when the proxy in front reports it). one_click true: show Approve without the warning. Otherwise, with a loopback_port, fetch the proof (GET http://127.0.0.1:<loopback_port>/tiltas/sign-in-proof → {"nonce"}) and send it as loopback_nonce; failing that show the warning, send confirm_different_network, and if session_fresh is false send the person through sign-in again first (return_to=/connect#code=…). 409 partner_sign_in for a Partner sign-in.

Authorization

headerAuthorizationBearer <token>

qlt_… Access token (kind api)

Path Parameters

user_code*string
Match^[A-Z0-9]{4}-[A-Z0-9]{4}$

Query Parameters

prefilled?boolean

the code came from verification_uri_complete

Response Body

OK

application/json
  1. response
user_code*string
device*
status*string
Value in"pending""awaiting_admin""approved""denied""expired""used""locked"
device_name?string

the Device name it will get (cleaned)

audience?string|null
requested_from*
same_network?boolean

false: the Device asked from another network than this browser; the page warns

requested_at?string

console: when the Device asked (the page shows "12 seconds ago")

Formatdate-time
age_seconds?integer
expires_at?string

console: the last moment it can be approved (5 minutes for a prefilled link)

Formatdate-time
via_link?boolean
views_left?integer

console: how many more browsers may open the code before it locks

loopback_port?|

the app answers GET http://127.0.0.1:<loopback_port>/tiltas/sign-in-proof with the nonce to send as loopback_nonce; null without a loopback offer (also on the partner view)

one_click?boolean

console: same network, approve without the warning

session_fresh?boolean

console: this session is at most 10 minutes old

fresh_session_required?boolean

console: approving from here needs the loopback proof, or a fresh session and confirm_different_network

default_account_id?|

console: the Network this person approved into last (never a Partner Network)

Example Request
curl -X GET 'https://tiltas.openpanel.sh/api/v1/device-sign-ins/string'
Example Response
{  "user_code": "string",  "device": {    "name": "string",    "os": "macos",    "app_version": "string",    "os_version": "string",    "client": ""  },  "status": "pending",  "device_name": "string",  "audience": "string",  "requested_from": {    "ip": "string",    "country": "string"  },  "same_network": true,  "requested_at": "2019-08-24T14:15:22Z",  "age_seconds": 0,  "expires_at": "2019-08-24T14:15:22Z",  "via_link": true,  "views_left": 0,  "loopback_port": 0,  "one_click": true,  "session_fresh": true,  "fresh_session_required": true,  "default_account_id": "string"}