Developer Documentation

/ Introduction

Back to Home

Quick start

Get data (or control a vehicle) in seconds.

  1. Generate an access token. Sign in, then generate a personal access token under Developers → Applications (or create an OAuth application).
  2. Send it as a bearer token. Include Authorization: Bearer <token> and Accept: application/json.
  3. Call an endpoint. Start with vehicle data, then swap in any endpoint from the sidebar.
bash
curl -s "https://teslascope.com/api/vehicle/:public_id" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json"
bash
curl -s "https://teslascope.com/api/vehicle/:public_id/drives" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json"
bash
curl -s "https://teslascope.com/api/software/latest" \
  -H "Accept: application/json"
bash
curl -s "https://teslascope.com/api/account" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json"

OAuth 2.0

Authenticated requests send Authorization: Bearer <access_token> and usually Accept: application/json. Each endpoint requires a token that includes the right scopes for that operation; otherwise the API responds with 401 or 403.

Token scopes

Scopes describe what a token is allowed to do on the API. Ask for the minimum you need. The names below are the same strings you pass in scope when authorizing or when creating a personal access token.

  • account Teslascope user profile and account APIs (e.g. GET/POST /api/account and related account security routes). Does not grant Tesla account linkage or vehicle data.
  • tesla-accounts Linked Tesla accounts under the user: list accounts, per-account vehicle listings, add/remove account associations, and refresh operations exposed under /api/account/tesla-*. Independent of drive/charge history and command execution.
  • vehicles Read-oriented vehicle APIs: metadata, drives, charges, trips, locations, and other /api/vehicle/... resources that do not send commands. Required for most vehicle data retrieval; does not include Fleet command pass-through.
  • controls Vehicle command surfaces (including Tesla Fleet API proxy command endpoints). Implies the ability to mutate vehicle state (climate, charging, honk, etc.). Keep separate from read-only vehicles where possible.
  • mcp:use Model Context Protocol (MCP): allows approved AI clients to use MCP tools on the user’s behalf over HTTP. Separate from the vehicle and account HTTP APIs documented in this reference.

Register or sign in to create clients and tokens.

API Keys

On endpoints that still support it, send the key only as a query parameter: ?api_key=<your_key>.

Security. Query strings often end up in browser history, analytics, and referrer headers. Treat API keys like passwords: keep them out of public repos, client-side code, and anywhere they could leak.

Compatibility. Only some older-style endpoints accept api_key; many newer paths require a bearer token. If you get 401 despite a valid key, switch to a personal access token with the scopes you need.

Create an account or sign in to issue keys from security settings.

Questions or corrections: [email protected] · Support