Tesla API Token

Last updated 06-Aug-2022

The current way we recommend generating tokens is a little messy but avoids you having to give us your username and password. Please read all the steps before continuing:

  • Click on the link below titled Tesla Logon which will open a new tab/window for the Tesla Authentication logon page
  • Log on using your Tesla credentials and MFA if required (Tesla will remember these if you have used the link before)
  • This will appear to result in a "Page Not Found". This is normal.
  • Copy the resulting URL of that webpage into the form below. Within the URL is a one time, temporary code that we can use to generate tokens. We will extract this for you from the link.
  • These links typically only work once, so if an "Invalid Grant" or other error message appears on our website you may need to start again with the Tesla Logon link which should produce the link straight away on subsequent occassions.
  • If you want to use a different account name or logon details, you may need to clear the cookies for your browser.
  • We will then get the tokens for the cars on your Tesla account.

Step 1:

Fill out this form: Tesla Logon.

Step 2:

Copy the resulting url as shown

Step 3:

Paste the url into the box below:

Tesla Token code
URL from Tesla including Code

Tesla simplified API made easy

We have created a simple API that takes car of waking the car should it be asleep, deals with various token issues and on a technical level uses a HTTP "GET" and not "POST" which is easier to implement from a web browser,

The beauty of these API URLs is that they can be included in an Apple shortcut or as part of some other automation. We transiently use your information to execute the request and then the information is forgotten by us, as a result we don;t need to store any of your information. And best of all, it's free.

For more information, see our guide to Tesla automation.

In general, tesla-info does not like the idea of third parties having access to your tesla details including token. This put us in a moral dilemma as many owners want to make use of the unofficial Tesla API for various activities and as part of scripting.

What we have come up with is the best compromise we can think of, we don't need your Tesla email address or password to generate your tokens, you use the Tesla login to generate an intermediate, one time code we can then use.

We have also created an approach to sending commands to your car using either the API or refresh token, these can be turned into Apple shortcuts or included in home automation. We still don't store your details and require you to send is either a valid API token or fresh token on every request. Obviously, you have to trust us here, but we are no different to any other application or web solution that uses your tokens, where we are different is that we don't store them and if our security is compromised, your details are not available to be taken.

If at any time you feel the security of yours, ours or any third party that has ever had your details has been compromised or your token leaked, visit tesla.com and change your Tesla password.


tesla-info on facebook Contact tesla-info on linkedin tesla-info on twitter tesla-info on youtube

By using our site, you acknowledge that you have read and understand our Privacy and Cookie Policy. Your use of the tesla-info website is subject to these policies and terms. All data is provided on a reasonable endeavours basis but errors and omissions may exist. No data should be relied upon as being accurate and additional checks should be made if the information is material to any purchase or use of the car. We provide product listings on Amazon for which we will receive a small commission if you chose to buy.
Ways you can support tesla-info