Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Manual Authentication

Brandon McFarlin edited this page Oct 14, 2021 · 19 revisions

Refresh Token

A refresh token is a long life token given to an application during OAuth. To get a refresh token, follow these steps:

  1. If the plugin is installed globally, run homebridge-nest-cam login, otherwise, ensure that you are in the plugin's root directory and run node dist/login.js.
  2. Follow the onscreen instructions.
  3. Copy the refresh token to your config.json.

Notes:

  • Field testers, please use the -ft flag to be redirected to the correct site.

Browser Cookies

The values of "issueToken" and "cookies" are specific to your Google Account. To get them, follow these steps (only needs to be done once, as long as you stay logged into your Google Account).

  1. Open a Chrome browser tab in Incognito Mode (or clear your cache).
  2. Open Developer Tools (View/Developer/Developer Tools).
  3. Click on 'Network' tab. Make sure 'Preserve Log' is checked.
  4. In the 'Filter' box, enter issue.
  5. Go to home.nest.com, and click 'Sign in with Google'. Log into your account.
  6. Click on the last iframerpc call.
  7. In the Headers tab, under General, copy the entire Request URL (beginning with https://accounts.google.com, ending with nest.com). This is your "issueToken" in config.json.
  8. In the Headers tab, under Request Headers, copy the entire cookie (include the whole string which is several lines long and has many field/value pairs). This is your "cookies" in config.json.
  9. Do not log out of home.nest.com, as this will invalidate your credentials. Just close the browser tab.

Notes:

  • If you are using this guide to authenticate homebridge-nest as well, your "apiKey" will be the same as the previous value. It should never change. Simply copy the new "issueToken" and "cookies" into the old ones and leave "apiKey" alone, and it should work.

Nest Auth Token

  1. Cancel out of the initial authentication screen:

  2. Manually copy and paste this object template into your config.json, inside the platforms array:

    {
        "nest_token": "TOKEN_GOES_HERE",
        "platform": "Nest-cam",
    }
    
  3. Log into https://home.nest.com and get to the main home screen

  4. Once authenticated, change the URL and navigate to https://home.nest.com/session

  5. Grab the value associated with the access_token key:

  6. Update your config.json and the nest_token key with the access token you copied, replacing TOKEN_GOES_HERE

  7. Make any additional modifications to the configuration based on the available options

  8. Save your configuration and restart the [child] bridge as necessary

Notes:

  • This is the same access_token that homebridge-nest uses if you want to grab from existing config*
  • All configuration must be done manually in your config.json - plugin-based config is not yet supported.
Clone this wiki locally