mseminatore / TeslaJS

An Unofficial Tesla API library for NodeJS
https://www.teslajs.org
MIT License
411 stars 102 forks source link

Access Tokens only valid for 8 hours #291

Closed joepalexander closed 2 years ago

joepalexander commented 2 years ago

Not an issue with this brilliant framework. But is this an issue everyone else is having? and has anyone conjured up a solution for it? I can generate my Tesla access tokens, however they used to be available for 30 days, it is now only available for 7 hours?

Any light on this anyone please

mseminatore commented 2 years ago

@joepalexander I think you have to trade in the 7 hour token for the 30 day token as one of the steps. How are you acquiring the 7 hour token?

tonybroadbent commented 2 years ago

Same problem here. I am using the IOS app 'Auth for Tesla'. Does anyone have a better way of getting a longer token cause 7 hours just isn't enough!

IMgoRt commented 2 years ago

Same problem here. I am using the IOS app 'Auth for Tesla'. Does anyone have a better way of getting a longer token cause 7 hours just isn't enough!

https://github.com/adriankumpf/tesla_auth

joepalexander commented 2 years ago

@mseminatore through auth app on iOS. Is there a better/new option? Since starting work as a data engineer I rarely find time to work on my personal projects so it all escaped me so quickly 😩

IMgoRt commented 2 years ago

There's an option to produce the 45 day refresh token

joepalexander commented 2 years ago

@IMgoRt YOU ABSOLUTE STAR YOU! Proof that not reading the docs can be detrimental! -o flag yielded me a 45 day access token. Crisis averted. @mseminatore Could the web view access token grabbing method be added into the login function? Is that something that would be possible?