Yeah, I saw that. I'll look into it, but not sure I have time currently. All the tampermonkey code is open-source javascript if anyone else wants to take a crack at it.
Here's a working PHP script to locally generate your V3 Refresh Token: **Working** PHP to Generate Refresh Token (Steps 1-4) · Discussion #288 · timdorr/tesla-api
Is there a working script to get a new token? I tried teslascope/tokens and enode-engineering/tesla-oauth2 with no success. Disabled my MFA and still no success. Getting 403s. Yes, I am using the right password
Well this morning the Teslascope script worked, nothing changed on my end. Guess there was some maintenance or a problem last night.
Hmmm. I got a token from the script but it doesn't seem to be working - getting 401s from API calls. New token seems really long, 870 bytes versus 68 bytes on my previous token. Ugh, help! Anyone have a python script that gets a token, and then performs a command that works?
No iOS here, but thanks for the suggestion. Sorry if I'm asking dumb questions, but I'm having a hard time figuring the new system out. Does this look like the format of current tokens? (it's obfuscated a bit) Code: eyphbGckOkpSUzk1NkksknR5cCk6kkpXtCkskmtpZCk6km9UaDR1ZXNoM2tlZXptWDB1kn0.eyJpc3fiOipodHRwcbovLtr1dllbdlVbblEb7t9tLt9hdXRofi9tf7IsIfr1bCI6Ifh4dHBbOi8v7XV4aC54bXNs7S5pbt4vbtr1dll7L37bL3RvatVbIiwiaWr4IpoxNpE4NDA7ODE5LCpb73AiOlsib3BlbflkIiwibtbfbllbbV9h7tNlc3fiXSwiblr47SI6e7ptIpoifSIsIfr1bCI6Ifh4dHBbOi8vb3dbbXIt7XBpLnRlctxhbW94b3pbLfNvbS8iLCpbdWIiOipiODNhblE4fi437phlLTQwODAtOl7wN743OTliNpI7fbbxblIiLCpb73AiOlsib3BlbflkIiwibW1haWwiLCpvbfbsaW5lXtrp7tVbc7pdLCphenAiOipvdt5lcfrwaSIsIfrtciI6W7pwdtQiXSwi7XV4ar94aW1lIpoxNpE4NDA7ODE5rX4.lt7EaElel3cwldoNx7DH5tltcqqOXD8EbrQlarbWib7bApKrp3aaPn-At7twK7TrB7ElL4lEx7HrhvOxsprbqSblqrNeBQRH4elVWHDl7n9Aw1v6lhHx4a9RDfTbIo1oIpn1wS_4l96nf_palQlAbpA6Ca_r8dKCbWrSC7tlPbHp9Xd8bcefl77xXapRlt3Rerb53rhaQPrfOAf77d774h3wAbRPW5pDNbfbx98eItLNf7A8b5O7panPbdbXxQ7bbRppl7DRL9wqd4iWbBlxlvRplf7ofiI6Qkspbl7rRNVQSo1b7bl_hV88Db7ENSbkfrdlP4pfw46KIPRdSblklQ
After reading Authentication a little more closely, that token above seems to be the JWT token that has to be exchanged per step 4. The teslascope script doesn't seem to do that. The enode-engineering one does, but I'm having trouble running it. So trying to use Postman, but at the moment I'm getting {"error": "unsupported SSO app"}. Found a few places that suggest it could be a header issue. Still investigating...
if anyone comes up with a script or webpage that actually works let me know the one on teslafi works, but i really want to generate a token with a separate username and password to use in my home automation integration.
Okay, I got the script from enode-engineering/tesla-oauth2 to work. Had to add --verbose to the command line otherwise there's a python error. And you have to save to a file with the -f option because the code that is printed to the console is NOT the access code.
Looks like the code for the enode-engineering script was updated last night after I downloaded it. The --verbose is no longer needed, the issue looks like it was fixed. But -f is still needed. Now the selenium python library is required, chromium-browser/chromedriver has to be installed, and libnss3 installed. And for me, sometimes it fails with "unknown error: DevToolsActivePort file doesn't exist", but running a little later works.