createPairingCode
# createPairingCode
POST
/auth/pairing-codes
const url = 'http://localhost:8080/api/v1/auth/pairing-codes';const options = {method: 'POST', headers: {cookie: 'hs_session=<hs_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/auth/pairing-codes \ --cookie hs_session=<hs_session>Creates a 10-minute code to sign in the Flutter app by QR (“Open on phone”).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Pairing code created.
Media typeapplication/json
object
code
required
Human-typable fallback.
string
qrPayload
required
Homestead://pair?server=
string
expiresAt
required
string format: date-time
Examples
Exampleseed
Derived from fixtures/seed.json.
{ "code": "K3M7QW9Z", "expiresAt": "2026-10-17T09:10:00.000Z", "qrPayload": "homestead://pair?server=http://localhost:5173&code=K3M7QW9Z"}