Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Tesla Owner API Tutorial (All you need is your browser)

This site may earn commission on affiliate links.
Well both apps I use are dead on so ... but I did check just in case the car as well. After the API call regardless of the limit set as a parameter the car charge % went to 50 instead of the provided by me 86 etc. Tried 80 etc.

I have never played with these API tokens before, but perhaps the POST command is wrong?

POST https://owner-api.teslamotors.com/api/1/vehicles/XXXXXXXXXXXXXX/command/set_charge_limit?percent=60

This is the current command. The "XXX" is my s_id #. That "?" after "set_charge_limit" does not look right to me. Maybe that is supposed to be a "/" like the other delimiters?
Computers aren't smart. If we make one small input error they cannot figure out what went wrong. GIGO Garbage In, Garbage Out
 
  • Like
Reactions: ishareit
I have never played with these API tokens before, but perhaps the POST command is wrong?

POST https://owner-api.teslamotors.com/api/1/vehicles/XXXXXXXXXXXXXX/command/set_charge_limit?percent=60

This is the current command. The "XXX" is my s_id #. That "?" after "set_charge_limit" does not look right to me. Maybe that is supposed to be a "/" like the other delimiters?
Computers aren't smart. If we make one small input error they cannot figure out what went wrong. GIGO Garbage In, Garbage Out

OK I got it. You ware in the right direction :)

The API for the set_charge_limit should have a body of:
{
"percent": <YOUR DESIRED % VALUE AS A NUMBER>
}


so the actual POST url looks like this:

https://owner-api.teslamotors.com/api/1/vehicles/20465486075957809/command/set_charge_limit
 
  • Like
Reactions: ishareit
  • Like
Reactions: GedMelbAU
For Windows users I already wrote a Powershell script using the Tesla API Powershell module to get my vehicle data. If anyone's interested I can make a version that specifically calls out the performance config. Functionally it's the same thing as manually crafting API calls, but there are fewer manual steps because once you provide your credentials the script can handle everything else when you run it.
 
  • Like
Reactions: phaduman and Krash
Doesn't work either unfortunately...

Edit: Works! I forgot to set the content type for body to json in Postman.

The final fix for me was entering Content-Type as application/json in the Header section of the Set Charge Limit section. None of the other sections, except the initial "Tokens" section, required me to enter the Content_Type application/json into the header section again in order for the request to work. For some reason, it must be re-entered into the Set Charge Limit header section. And quotation marks were not needed around the percent number in the Body command. Whew! I shoulda stood in bed.
 
Ask them (nicely) to show you the diagnostics screen so you can verify the uncork took. Based on the data we have so far, the API will only tell you part of the story. But even so, any car with "P3", as far as we can tell, is not uncorked:



JDeck has collected some more data from his Teslafi platform here that does seem to validate that P3 = corked for 75Ds: http://firmware.teslafi.com/uncorked.php

View attachment 256637

I have a 90D from 2016 facelift.
My API perf_config says P1

Does this mean my car is uncorked, but what does it mean for a 90D?
 
I have a 90D from 2016 facelift.
My API perf_config says P1

Does this mean my car is uncorked, but what does it mean for a 90D?

As of right now, ONLY 75Ds can be "uncorked".

P1 for a 90D just means that you already have the higher performance torque curve/1300A limit for the smaller dual motors (the same that would apply to an uncorked 75D) applied to your car... So, essentially, yes, means you are "uncorked".
 
  • Like
Reactions: croman
Not having uncorking take makes sense. When I took mine In last week they told me it took 3 times for the update to take. I could see someone thinking it took but really didn’t if they didn’t verify. Took a few hours but performance was Definetly noticeable. Though I am kind of curious to try this check to verify a P1 still.