DeveloperSkip to main content

  1. Fleet API
  2. Charging

Authentication

API endpoints require an authentication token. It must be included as a header:

Authorization: Bearer <token>

Token Types

There are four types of tokens, each used with a different purpose. Identifying the proper token type is important. Otherwise, the API will return unexpected responses.

Choose a token type based on use case.

  1. Developers building closed-source software on top of Fleet API that will access user's accounts: Third party token.
  2. Businesses registered with Tesla for Business looking to interact with their Tesla products: Partner token.
  3. Developer building open-source software which interacts with Fleet API: Open-source token.
  4. Hobbyists looking to interact with their own Tesla products: Third party token.
  5. Applications authenticating on behalf of a business: Third party for Business token.
  6. All calls to Partner Endpoints: Partner token.

Scopes

Scopes are used to limit API access to only the data an application needs.

NameScopeDescription
Sign in with TeslaopenidAllow Tesla customers to sign in to the application with their Tesla credentials.
Refresh Tokensoffline_accessAllow getting a refresh token without needing user to log in again.
Profile Informationuser_dataContact information, home address, profile picture, and referral information.
Vehicle Informationvehicle_device_dataAllow access to your vehicle information, including data such as your vehicle's live data, service history, service scheduling data, service communications, eligible upgrades, nearby superchargers, ownership details.
Vehicle Locationvehicle_locationAllow access to your vehicle location information, including data such as precise location, and coarse location for approximate location services.
Vehicle Commandsvehicle_cmdsCommands like add/remove driver, access Live Camera, unlock, wake up, remote start, and schedule software updates.
Vehicle Charging Managementvehicle_charging_cmdsVehicle charging history, billed amount, charging location, commands to schedule, and start/stop charging.
Energy Product Informationenergy_device_dataEnergy live status, site info, backup history, energy history, and charge history.
Energy Product Settingsenergy_cmdsUpdate settings like backup reserve percent, operation mode, and storm mode.

The OAuth server's metadata file can be found at: https://auth.tesla.com/oauth2/v3/thirdparty/.well-known/openid-configuration.

A Postman collection with these requests can be found here.