Pairing
Give a phone its own key through a one-time code from a QR code, over the HTTP API.
Pairing connects a phone without typing an address or a key. A client that already has a key, such as the web client, makes a one-time code and shows its link as a QR code. The phone scans it and trades the code for a key of its own.
Each phone gets its own key, listed under Settings > Devices in the web client. A browser pairs the same way: a pairing link opened in one, or the web client opened by System Bridge itself, carries a code in pair that the page trades for that browser’s own key. Another computer’s CLI pairs with the link too, with platform cli. To stop a phone connecting, remove its key there. Pairing the same phone again replaces its key rather than adding another.
Make a code
Needs a key, as Authorization: Bearer.
POST /api/pair/code
Authorization: Bearer {key}
{
"code": "MZXW6YTBOI4DQNZXGQ2DGMBQGE3TSNBR",
"link": "http://desk.local:9170/?ip=192.168.1.5&pair=MZXW6YTBOI4DQNZXGQ2DGMBQGE3TSNBR",
"expiresAt": "2026-11-08T18:31:54Z"
}
The code works once, for 5 minutes. When the request came to a name, such as desk.lan, link keeps it. When it came to an address, or localhost, link uses this computer’s mDNS name, such as desk.local, which still finds it when its address changes. The address rides along in ip, or for localhost this computer’s IPv4 address on the default route, for a phone that can’t resolve the name. The Android app tries the name first, then ip, and keeps whichever answers.
Trade a code for a key
Takes no key, as the code is the credential.
POST /api/pair
Content-Type: application/json
{
"code": "MZXW6YTBOI4DQNZXGQ2DGMBQGE3TSNBR",
"client": { "id": "4c1f…", "name": "Pixel 9", "platform": "android" }
}
{
"token": "system-bridge_client_…",
"service": { "id": "460a64ce-6fcd-4f32-b7a5-a6f0d3546c87", "name": "desk" }
}
token is the phone’s own key, shown this once. The phone keeps client.id, so pairing again replaces its key. service.id is the same uuid System Bridge advertises over mDNS, so a computer found that way matches the one paired. service.name is its hostname.
An unknown, used or expired code gets 401. Codes are 160 random bits, so they can’t practically be guessed.