Getting Started

API

Using the Tesla Fleet API

Teslemetry will proxy any Tesla Fleet API requests with a valid access token and subscription to the correct Fleet API regional server for your account. Documentation on the available Fleet API endpoints can be found at developer.tesla.com/docs/fleet-api.

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 Example
curl --header "Authorization: Bearer {token}" 'https://api.teslemetry.com/api/1/vehicles/{vin}'
Browser Example (less secure)
https://api.teslemetry.com/api/1/vehicles/{vin}?token={token}
Python Example
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())

PyPi - GitHub

TypeScript Example
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))

NPM - GitHub

Virtual Key & Command Signing

Newer 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. The vehicle owner 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.

Special endpoints

Teslemetry has a few special endpoints that are not part of the Tesla Fleet API.

GET /api/test - Tests authentication and returns true.

GET /api/metadate - Returns your UID, region, and scopes.

GET /api/config/{vin} - Returns your stored telemetry config (may not be active)

POST /api/config/{vin} - Replaces your stored telemetry config and sends it to your vehicle

PATCH /api/config/{vin} - Updates your stored telemetry config and sends it to your vehicle

POST /api/webhook - Create a new webhook with a JSON body containing url, auth, vin, and format.

DELETE /api/webhook - Remove a webhook with a JSON body containing the url.