generate-tesla-token
generate-tesla-token copied to clipboard
A tiny script to generate Tesla login-tokens quickly.
generate-tesla-token
This is a tiny, one-off module to generate [Tesla API][API] tokens (necessary if you don't want to give your username and password out to random Internet services) locally, i.e. if you're properly paranoid, and don't want to trust websites that say they “don't store the information, and only use it to generate a token.”
Hopefully, with the immanent release of the Model 3, Tesla will get off their collective asses and offer a proper OAuth authentication (and crucially, revocation) flow, with granular permissions ... until then, be careful with this. Any token you generate with this can be used to unlock, locate, start your car!
Here's a couple sites for which this is useful (i.e. ones that allow you to directly enter a token, manually):
-
https://TeslaLog.com, an automated data-logger and graph generator for Tesla drivers
-
The My Tesla skill for Amazon Alexa and Echo devices
Usage
You'll need Node and npm installed, first.
You can install this Node package the traditional way, if you really want it sitting around on your computer and getting out-of-date ...
npm install -g generate-tesla-token
Or, if you have a recent version of npm, it's much simpler to use npx
(you can get it by
upgrading npm with npm install -g npm
, or install directly with npm install -g npx
):
npx generate-tesla-token