tdorssers / TeslaPy

A Python module to use the Tesla Motors Owner API
MIT License
374 stars 83 forks source link

New SSO Token Method did not work for non-Desktop Clients #43

Closed JxxKal closed 3 years ago

JxxKal commented 3 years ago

Hi, since the SSO Token query opens a Webbrowser on the same machine to get the Access-Token after a successful login, it was no longer possible to do this on my Linux Terminal-only Device to obtain a new Token via this method.

I am unsure if I might did not get everything right, maybe there is still the old method available, but I could not find it at least. I helped myself by just add "print(url)" to init.py where TeslaPy is waiting for the Users response with the URL. Then I could just copy the request-URL to my Desktop Machine and did the Token-Query Process there and copy the response back into the stdin.

So it would be great to get this easy response URL output to the current version, might be others with Terminal only Linux Servers out there :-)

tdorssers commented 3 years ago

There are others: #39. Please check out commit 105b0a6. If no browser is detected, then the URL is printed to stdout.

JxxKal commented 3 years ago

Many thanks! custom_auth looks promising! Interestingly just copy the cache.json from a Desktop (Mac) to the Pi does not worked for me…it looked like the oauth process adds an identifier…just a guess.