Tesla API and Refresh Token Generator

Last updated 03-Nov-2023

Tesla refresh and API tokens are often required by 3rd party apps to allow access to your car. This web page allow you to generate these tokens without providing you Tesla email address or password to us. This is the safest way we know to generate a your Tesla tokens and is completely free.

Tesla are changing the way tokens work and as a result out token generation tool may well fail. We have applied for a license to continue to generate tokens but this has not yet been granted by Tesla

How to generate a Tesla Refresh and API token

The current way we recommend generating API and Refresh 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 only work once, so if an "Invalid Grant" or other error message appears on our website you will probably need to start again with the Tesla link on our page which should produce the code straight away on subsequent occassions. Then copy the associated URL omntp our webpage.
  • 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 until you see "Page not found".

Step 2:

Copy the resulting url as shown

Step 3:

Paste the resulting url into the box below:

Note

It is important not to refresh our web page, if you do you may need to close the Tesla logon web page and start again. After you have submitted the Tesla url, it can take a several seconds for us to create the Tokens, please be patient.



Tesla Token code

Tesla simplified API made easy

The use of the Tesla API has been made more difficult asa number of criteria need to be met before a command can be successfully executed. The API tokens used to last for 30 days, Tesla have reduced this to 8 hours. The car Id needs to be identified and specified. And the car needs to be awake before a command can be executed. Rather than multiple requests and token exchanges, we have created a simple, secure API that takes all these various steps, all you need to do is provide the refresh token and the request as part of the secure call.

The beauty of these API URLs is that they can be included in an Apple shortcut or as part of some other automation. And best of all, it's free.

For more information, see our guide to Tesla automation.

Please be careful with who you share your tokens with. These given people the ability to locate, open, and potentially drive your car without your permission.

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 tesla-info on Discord

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.
Ways you can support tesla-info