August 13, 2018

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.

iMazing2 - This application makes it easy to download the .ipa files from Apple’s servers.

files from Apple’s servers. Charles Proxy - This is a proxy server that can be used to inspect network calls coming from your mobile device.

Hopper - This is a disassembler that allows you to reverse engineer compiled binaries.

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.

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

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

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. ownerapi_endpoints.json - A list of all of the endpoints for Tesla’s products.

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:

GitBook directly on https://teslaapi.io 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

27 Kudos