POST
/api/im/remote/pair/qr-init
Create QR pairing offer
Daemon creates a QR pairing offer with a 5-minute TTL. The cloud stores the offer
blob (opaque, daemon-signed) and returns a QR data string for the daemon to render.
Mobile scans the QR and calls POST /api/im/remote/pair/qr-confirm.
当前语言暂无代码示例
请求体
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| daemonId | string | Y | — | Stable UUID for this daemon instance |
| daemonPubKey | string | Y | — | X25519 public key (encryption), base64-encoded |
| daemonSignPub | string | Y | — | Ed25519 public key (signing), base64-encoded |
| deviceName | string | N | — | Human-readable name shown to mobile user |
| offerBlob | string | Y | — | Opaque daemon-signed blob — cloud stores but does not decrypt |
| ttlSec | integer | N | — | Offer TTL in seconds (default 300 / 5 min) |
| expiresAt | string | N | — | Computed expiry timestamp (returned in response, not sent in request) |
响应示例
{
"ok": true,
"data": {
"offerId": "offer-uuid",
"expiresAt": "2026-04-15T10:05:00Z"
}
}