The Tesla API

Screen Shot 2018-08-06 at 5.24.11 PM.png

To create my own Mobile Application, I need to figure out Tesla’s API. Since I am more familiar with iOS and Apple ecosystem, I am going to use tools I have at my disposal to try and figure out what API’s are available.

 My Toolset

 Process

In order to reverse engineer the Tesla API, I need to figure out what API the current mobile app uses. I have version 3.4.3 installed on my phone so I started with that App.

  1. Use iMazing to Download the Tesla 3.4.3.ipa
  2. Rename the Tesla 3.4.3.ipa to Tesla 3.4.3.zip
  3. Unzip Tesla 3.4.3.zip
  4. cd into the Payload/TeslaApp.app
  5. List files

Now that we are in the application bundle, there are two files that are notable and important.

  1. env.json - This has a lot of great information we need. The API endpoint, the OAuth client and secret, and web socket streaming API endpoint.
  2. ownerapi_endpoints.json - A list of all of the endpoints for Tesla’s products.

 Documentation

With this information I will start documenting the API endpoints. My documentation will be a mix of existing documentation, disassembly, and network traffic sniffing. All of the documentation will be available on this site which I’m using to keep track of all of the endpoints:

https://teslaapi.io

If you are in the development community and want to help by contributing your findings to the API, there are two ways to help:

  1. GitBook directly on https://teslaapi.io
  2. GitHub on https://github.com/joeblau/teslaapi.io

If you’re looking to buy a Model X, Model S, or Model 3 Dual Motor and want unlimited Super Charging, please use my code http://ts.la/joe5702

 
10
Kudos
 
10
Kudos

Now read this

The Transportation Renaissance

Human beings are embarking on the dawn of a transportation renaissance. In the past five years, multiple evolutionary and revolutionary transportation products surfaced with the potential to dethrone incumbent businesses and reshape our... Continue →