Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register
This site may earn commission on affiliate links.
Hey, thought I'd throw this out there real quick: if you're using something like TeslaLog or the My Tesla Alexa-skill, and need an authentication token, I've thrown together a little self-installing tool to generate them quickly. (It doesn't store them anywhere, or contact any servers other than Tesla's — so no giving out your Tesla password to random websites, which is A Good Thing™.)

If you're a developer like myself, and already have recent npm, you can just use the new npx tool to run this without any installation:
Code:
npx generate-tesla-token

If you have no idea what any of that means, you can open the Terminal application on your Mac, and type these two lines:
Code:
npm install -g generate-tesla-token
generate-tesla-token

28244480-e69b65e6-69b1-11e7-9cc8-be027d87f84c.png


(And no, that isn't a working login token in the screenshot. ;))
 
Thanks, I had updated to npm v5.0.3 and node v8.1.4 Now it works great.

Yeah, I'm a lazy buttface, and just knocked this together on a whim — didn't bother testing in older versions. I'm sure I used some ES2016-ism or something by accident.

I'm happy to accept any pull-request — don't even have to make it pretty; just click the link and fix whichever line's erroring:

Build software better, together
 
Nice job.

Since a lot of people are installing VisibleTesla just to get their list of option codes (and new drive unit code), maybe when you get the token, also grab their options list and optionally display it?

Sounds out-of-scope, tbh. That said, a generalized npm install -g tesla tool, based on TeslaJS but with a consistent CLI and configstore token-caching, would probably be a well-received project … and given that TeslaJS has done all the hard work, wouldn't be at all difficult to throw together, if you wanted to! <3