Skip to main content

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

The device serial is extracted from the Basic Auth user ID.

Response (200 OK)

The expires field must be a JSON number, not a string. If it is sent as "1707234600000" (a string), the device silently rejects the response and never displays the entry key. The expiration must be at least 30 minutes in the future.

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


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


Pairing Flow

Next Steps

POST /api/register

Claim an entry key and register a device

POST /nest/transport

Subscribe endpoint (long-poll)