Overview
The/nest/passphrase endpoint generates 7-character entry keys that allow users to claim (link) devices to their accounts. The device polls this endpoint during pairing to get the code it displays on-screen.
A companion endpoint /nest/passphrase/status lets the device poll to find out if its entry key has been claimed.
These endpoints are part of the Device Protocol API on port 8000. They are called directly by thermostat firmware during the pairing flow.
Endpoints
GET /nest/passphrase
Returns the current unexpired entry key for the device. If no valid key exists, a new one is generated. The device polls this endpoint repeatedly during pairing. The server returns the same key on each request until it’s claimed or expires — generating a new key on each call would invalidate the key before the user can enter it.Request
Response (200 OK)
| Field | Type | Description |
|---|---|---|
value | string | 7-character alphanumeric entry key (e.g., A3XR7M2) |
expires | number | Expiration timestamp in milliseconds since Unix epoch |
Entry Key Properties
- Length: 7 alphanumeric characters
- Display format: The device shows the code as
XXX-XXXX(e.g.,A3X-R7M2) - TTL: 1 hour by default (configurable via
ENTRY_KEY_TTL_SECONDS) - Reuse: The same key is returned until claimed or expired
- Single-use: Can only be claimed once
Error Responses
| Status | Body | Cause |
|---|---|---|
400 | {"error": "Device serial required"} | Missing or unparseable Basic Auth |
503 | {"error": "Entry key service unavailable"} | Database unavailable |
GET /nest/passphrase/status
Lets the device poll to discover if its entry key has been claimed by a user.Request
Response: No Key Found
Response: Key Pending (not yet claimed)
Response: Key Claimed
| Field | Type | Description |
|---|---|---|
status | string | "no_key", "pending", or "claimed" |
claimed | boolean | Whether the key has been claimed |
claimedBy | string | User ID that claimed the key (when claimed: true) |
claimedAt | number | Claim timestamp in ms (when claimed: true) |
expiresAt | number | Expiration timestamp in ms (when status: "pending") |
Pairing Flow
Next Steps
POST /api/register
Claim an entry key and register a device
POST /nest/transport
Subscribe endpoint (long-poll)