/papi/*.
QR / deep link
- Scheme
fau, hostpair(path-style URI as above). codeis exactly six decimal digits.hostmust be present; prefer the relay hostname from the Mac (not127.0.0.1).fpmust be present; display it during pair so the user can confirm the laptop.
POST /papi/pair either
way.
POST /papi/pair
Unsigned. The pairing code is the capability (single use, ~10 minutes).
Success 200
host(normalizedhttps://…)device_id- secret key (secure storage)
- node fingerprint
- optional
mail_addressfor UI only
Failure
Typical400 when the code is wrong, expired, or already used. Show a plain-language
retry (“show the square again”), not a stack trace.
Security expectations
- Generate the key on device. Never send the secret to your backend.
- Prefer biometric-locked secure storage when the OS supports it.
- One physical phone can run two apps = two pairs = two
device_ids. - Removing the device on the Mac clears trust; your app should clear local credentials
when the user chooses “remove this phone,” and best-effort clear the push token first
(
POST /papi/push-tokenwith{"token":""}).
After pair
All other/papi/* calls require device signing. Start with
GET /papi/pending.