Skip to content

Create a pairing code

POST
/v1/pairing
curl --request POST \
--url https://your-machine.your-tailnet.ts.net/v1/pairing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "publicUrl": "https://example.com" }'

A one-time code (valid 10 minutes) and its QR code, which the OpenLine app scans.

Media typeapplication/json
object
publicUrl

Address the phone should use. Defaults to the saved public address.

string format: uri

Example generated

{
"publicUrl": "https://example.com"
}

Pairing code.

Media typeapplication/json
object
code
string
expiresAt
string format: date-time
publicUrl
string format: uri
pairUri
string
qrSvg

QR code of pairUri as SVG markup.

string

Example

{
"code": "K7QM4TZP",
"pairUri": "httpgateway://pair?url=https%3A%2F%2Fgw.example.com&code=K7QM4TZP"
}