Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Tesla Owner API Tutorial (All you need is your browser)

Exiom

Member
Nov 29, 2017
206
111
Hong Kong
After you generated the token... Did you even send the token back?

Edit:
I just checked... I am 100% positive you did not send the auth token on your GET request... you need to send the auth token back every subsequent time after generating your auth tokens
 

SilverGS

Active Member
Nov 3, 2016
1,716
1,028
Ontario
@Akrion Sorry for the noob question. I just stumbled across this invaluable thread of yours and I immediately wanted to try this as I have June build 2016 75D that I bought from Tesla directly and they confirmed its been uncorked. :)

Anyway I just watched your video and got stuck at the beginning with the URL you mentioned. That comes as a page that is no longer available. So I tried to the URL that is mentioned on that page goes here - Introduction

Once you get there, its not clear (and I clicked on every single link, so it must a geriatric thing with me), I couldn't figure out how to go to the next step (login to my Tesla account etc and get the API).

If you don't mind, can you please point out how to do that from the URL mentioned above or if there is another way, that is fine too.

TIA!
 

SilverGS

Active Member
Nov 3, 2016
1,716
1,028
Ontario
@SilverGS sure man no problem at all. The link to the first post is somewhat dated which is why I forked the Apiary docs. You can find the updated one here which is the one used in the video. The last post I did right above yours also has a link to a step by step article which walks you though the main steps. Let me know if that helps.
Thank you very much! I will attempt to go through this tonight. Thanks again!
 

SilverGS

Active Member
Nov 3, 2016
1,716
1,028
Ontario
@Akrion Sorry to bother you again.

I was able to get through the first couple of steps - car id and access token, however now looking at the vehicle state I can't see where it says the car is uncorked or not. The parament perf_config seems to be missing in the vehicle state output. How else can I figure out if the car has been uncorked?

Here is the output I got:

{
"response": {
"api_version": 6,
"autopark_state_v2": "standby",
"autopark_style": "dead_man",
"calendar_supported": true,
"car_version": "2019.20.4.2 66625e9",
"center_display_state": 0,
"df": 0,
"dr": 0,
"ft": 0,
"homelink_nearby": false,
"is_user_present": false,
"last_autopark_error": "no_error",
"locked": true,
"media_state": {
"remote_control_enabled": true
},
"notifications_supported": true,
"odometer": 17802.533662,
"parsed_calendar_supported": true,
"pf": 0,
"pr": 0,
"remote_start": false,
"remote_start_enabled": true,
"remote_start_supported": true,
"rt": 0,
"software_update": {
"expected_duration_sec": 2700,
"status": ""
},
"speed_limit_mode": {
"active": false,
"current_limit_mph": 52.688698,
"max_limit_mph": 90,
"min_limit_mph": 50,
"pin_code_set": true
},
"sun_roof_percent_open": 0,
"sun_roof_state": "unknown",
"timestamp": 1563551103751,
"valet_mode": false,
"vehicle_name": "Rocket"
 

Akrion

Member
Aug 16, 2017
56
78
CA
@SilverGS yes that is correct. Tesla found out that people were getting smart enough to read the config values and removed some of them. `perf_config` is no longer present there. It has not been for some time now apparently.

Either that or those values simply do not matter now since their battery and performance modes are being consolidated to only few options.
 
I searched through the threads here but all I was able to find was a little bit too technical IMO for the average user and the step by step how to was not really there. I love the fact that Tim did the Apiary.io documentation and wanted with just the browser to walk through an example of how to get your Tesla's vehicle state etc.

I ended up actually doing this step by step for myself and that is how I found out that my "uncorking" was not done although my car was 2 months ago with Tesla of West Palm Beach for that exact purpose. So I have a real life example how this helped me.

Obviously, you can go like 10 different ways to get to the API and work with it but what I really liked with the Apiary.io was that all you need is just the browser so anyone can quickly do it without any other tools like Postman etc.

In any case, hope this is useful to the community and my apologies if it was done already. I did not find much on YT on the subject.



PS. There are few issues in the video like the Content-Type header param etc but overall it should suffice for the average user to follow and get data for their vehicle out IMO.

Hi there, I am lost as to what to do when I am at the recommended website Introduction. I can't find the button to "Get access Token"... so I can't even start the whole process - can you point me to the right direction? Thanks!
 

Products we're discussing on TMC...

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top