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

Model 3 App and API

This site may earn commission on affiliate links.
First post in the Model 3 community. I'm looking for an owner of a Model 3 who'd be willing to help me document the Model 3 specific APIs. Once documented developers will be able to add functionality to their apps, voice assistant skills and sites. Right now these APIs are undocumented and are waiting with someone with a Model 3 and the know-how to document them.

Anyone with a Model 3 willing to help?

Here's a GitHub issue by the dev that maintains the current API documentation.
Model 3 APIs · Issue #52 · timdorr/model-s-api · GitHub

Feel free to PM if you'd rather have the conversation there.
 
  • Like
  • Love
Reactions: Bokonon and Pkmmte
Disregard, found a way to fake my way into it.

IMG_0003.png
 
  • Funny
Reactions: Tezlanian
I'm willing to help too.

My own experience: I'd written a small logging script using teslajson.py for our prior MSs. When we took delivery of our M3, the new car became the zeroth index vehicle (self.vehicle = connection.vehicles[0]) and the S became vehicles[1]. It surprised me that the vehicle assignment to index had changed. Also, both times we changed vehicles, the API started working only around odometer mile 200.

The logger reads odometer, battery range, est_battery_range, charge_energy_added, outside_temp, and inside_temp. All those parameters are being retrieved for the M3 except est_battery_range, which is coming out as zeros each time. No errors, just zeros.

When/if I get some spare time, I can run the other parameters from Tim Dorr's API page, see which work on the M3.
 
  • Informative
Reactions: stayfocus18
I'm just trying to get my Model 3 logging charging data and so far, so good. But, I tried to wake my car with the API and the "wake_up" command this morning and got 404. Anyone tried this? I can't get the charging data if it's asleep.....
Yup. It works fine for me using the URL
Code:
https://owner-api.teslamotors.com/api/1/vehicles/VEHICLE_ID/wake_up

Make sure you are using the correct vehicle ID. It's the "id" field in the vehicle list response *not* the "vehicle_id" field.
 
Yup. It works fine for me using the URL
Code:
https://owner-api.teslamotors.com/api/1/vehicles/VEHICLE_ID/wake_up

Make sure you are using the correct vehicle ID. It's the "id" field in the vehicle list response *not* the "vehicle_id" field.

Yeah, I made that mistake first and already corrected that!

I did find my issue though, I left out the PUT statement I had just copied and pasted my last successful script which was a GET. Simple fix and all is working!
 
i had no idea there was an api available for teslas. what cool things can you do with the api? Is it just monitoring\logging info, or can i rewrite what is the equivalent to air and fuel tables in an ICE's ECU?

Remote APIs should be kept to bare minimum of what is required for reasonable remote management. Anything beyond that you should require local access.
 
  • Like
Reactions: kablammyman
Just got my car yesterday (M3) and I can't seem to get the API access to work. I was able to get a token using either a curl command or python script but when I try any of the other commands (e.g. vehicles) I get an "invalid token" error. Tried resetting my password and generated a new token but still no luck. I get the same error whether I go straight from the Tim Dorr site or via curl or python. Anyone else been able to get results with a new M3?