Setting up Nest Account - Getting "Token is invalid and could not be refreshed: Access token request failed"

  • Platform information:
    • OS: Ubuntu 18
    • Java Runtime Environment: 1.8.0_171
    • openHAB version: 2.2

Help please! I am trying to setup a Nest Account for the first time in OpenHAB2 in the PaperUI and appear to be running into problems acquiring an access token from Nest. I am providing the correct product_id, product_secret and pin_code generated my Nest development account but no luck.

Here is the output from my OpenHAB2 logs:

==> /var/log/openhab2/events.log <==
2018-04-30 14:16:45.680 [hingStatusInfoChangedEvent] - 'nest:account:bb8f80b3' changed from UNINITIALIZED to INITIALIZING
2018-04-30 14:16:45.721 [hingStatusInfoChangedEvent] - 'nest:account:bb8f80b3' changed from INITIALIZING to UNKNOWN: Starting poll query
2018-04-30 14:16:45.971 [hingStatusInfoChangedEvent] - 'nest:account:bb8f80b3' changed from UNKNOWN: Starting poll query to OFFLINE (CONFIGURATION_ERROR): Token is invalid and could not be refreshed: Access token request failed
2018-04-30 14:23:18.088 [hingStatusInfoChangedEvent] - 'nest:account:bb8f80b3' changed from OFFLINE (CONFIGURATION_ERROR): Token is invalid and could not be refreshed: Access token request failed to REMOVING
2018-04-30 14:23:18.095 [hingStatusInfoChangedEvent] - 'nest:account:bb8f80b3' changed from REMOVING to REMOVED
2018-04-30 14:23:18.101 [hingStatusInfoChangedEvent] - 'nest:account:bb8f80b3' changed from REMOVED to UNINITIALIZED
2018-04-30 14:23:18.124 [hingStatusInfoChangedEvent] - 'nest:account:bb8f80b3' changed from REMOVED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-04-30 14:24:07.895 [hingStatusInfoChangedEvent] - 'nest:account:e5b52812' changed from UNINITIALIZED to INITIALIZING
2018-04-30 14:24:07.902 [hingStatusInfoChangedEvent] - 'nest:account:e5b52812' changed from INITIALIZING to UNKNOWN: Starting poll query
2018-04-30 14:24:07.914 [hingStatusInfoChangedEvent] - 'nest:account:e5b52812' changed from UNKNOWN: Starting poll query to OFFLINE (CONFIGURATION_ERROR): Token is invalid and could not be refreshed: Access token request failed

I don’t believe the request is being blocked by my firewall as I have temporary disabled the firewall and still get the same error messages. I am not sure what else to check.

Does anybody have an idea of what to try next?

I even have this problem with ubuntu.
Synology docker works
interesting.

If it is invalid you first need to clear the invalid Access Token from your Nest Account in Paper UI.

You need to click on the Show More button in your Nest Account to show it. Only then you can enter and use a new Pincode to obtain a new access token.

When the Pincode is valid, the Pincode is cleared and the new access token is again visible via the Show More button.

The problem here was that I wasn’t receiving an access token. The “Access Token” field in PaperUI was not populating despite providing all of the correct information from my Nest account.

After several attempts at reissuing pin codes I still could not get an access token. I ended up reinstalling OpenHAB and the very first time I tried it after the install I received an access token and it setup successfully.