Search code examples
sessionoauth-2.0access-tokennest-api

How long does a Nest OAuth token last?


I have to go through a pin-authentication process to get an access token. How long does this access token last? Do I need to do anything to keep the session alive or do I just need to store the token?

What doesn't make too much sense is that I have gone through the pin-auth process numerous times and according to developer.nest.com/clients I still only have 1 current user/1000 which makes me think that the existing one is destroyed every time I ask for a new one.


Solution

  • I got a value of 1729295254.0 when using the Sanction Python module to get an OAuth access token which translates to ~54 years provided I did the math right and the initial value was in seconds.

    The answer to the second question is most likely that it is due to which nest account is logged in (has always been the same one for me).