Since there seemed to be a bit of disorder on how, exactly, to get Tesla API tokens to be used to securely use 3rd party applications, I decided to take it upon myself to create a (very) simple python script that will generate and print out a token, given a correct username and password, along with what day and time the token will expire.
Right now it requires a little technical knowledge in that python must be installed along with the python requests package, and the script must be run in a terminal. But no actual code needs to be written by the user. Usage is as follows:
python teslatoken.py -e <mytesla email> -p <mytesla password>
I don't have much experience doing so, but going forward I may try to package it up in a nicer way to reduce the need for technical knowledge.
For now the code is all there, so everyone can feel free to double-check it and verify it's not malicious or anything. It's just a pretty straight forward requests call to the Tesla owner API, some datetime formatting, and handling of different error response codes.
Right now it requires a little technical knowledge in that python must be installed along with the python requests package, and the script must be run in a terminal. But no actual code needs to be written by the user. Usage is as follows:
python teslatoken.py -e <mytesla email> -p <mytesla password>
I don't have much experience doing so, but going forward I may try to package it up in a nicer way to reduce the need for technical knowledge.
For now the code is all there, so everyone can feel free to double-check it and verify it's not malicious or anything. It's just a pretty straight forward requests call to the Tesla owner API, some datetime formatting, and handling of different error response codes.