API
Teslemetry will proxy documented Tesla Fleet API requests with a valid access token and subscription to the correct Fleet API regional server for your account. Documentation on all the available API endpoints can be found at api.teslemetry.com/docs.
Sending API Requests
API requests use the exact same URI path as the Tesla Fleet API, with one of the Teslemetry load balancers as the domain name.
Teslemetry has three load balancer addresses:
api.teslemetry.com
- Automatically picks the closest region.na.teslemetry.com
- Only uses North American regions, ideal for the Tesla NA region.eu.teslemetry.com
- Only uses European regions, ideal for the Tesla EU region.
curl --header "Authorization: Bearer {token}" 'https://api.teslemetry.com/api/1/vehicles/{vin}'
https://api.teslemetry.com/api/1/vehicles/{vin}?token={token}
import asyncio, aiohttp, tesla_fleet_api
async def main():
async with aiohttp.ClientSession() as session:
api = tesla_fleet_api.Teslemetry(access_token="access_token_here",session=session)
try:
print(await api.vehicle.vehicle_data("your_vin_here"))
except tesla_fleet_api.exceptions.TeslaFleetError as e:
print(e)
asyncio.run(main())
import { Teslemetry } from 'tesla-fleet-api';
const teslemetry = new Teslemetry("access_token_here");
teslemetry.products().then((products) => { console.log(products); });
teslemetry.vehicle.options("your_vin_here").then(x => console.log(x))
Virtual Key & Command Signing
Most vehicles require commands to be signed by Teslemetry to increase security. You can see if your vehicle requires command signing by looking at the Command Sign value in the console. You can install the Teslemetry virtual key by clicking the following link using a mobile phone with the Tesla app installed:
https://tesla.com/_ak/teslemetry.com
You can read more about the Virtual Key and Command Signing topics.
Custom endpoints
Teslemetry also has its own API endpoints which can help you interact with the service itself, and provides additional functionality on top of the Fleet API.
The API is constantly improving, so please refer to the API documentation for the most up-to-date information.