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

Model S REST API

This site may earn commission on affiliate links.
Just edited the token shortcut without changing anything and it works. Still none of the commands work, vehicle_data returns an error with a proper token for example. I suspect it has something to do with Shortcuts since other tools are working.
 
In my testing I mixed up id and vehicle_id so now all seems well again. I think there were two problems, first one fixed just by replacing the client_id and client_secret with the same values and then fixing the problem I created by mixing up which id to use. Sounds like the original problem was some kind of formatting issue with Shortcuts which solved itself with an inconsequential edit.
 
It looks like Tesla may have firewalled off cloud providers from using their endpoints recently. This is a bit inconvenient for me as it seems to have happened just around the time I got evacuated from my home due to fires, so I'm missing a lot of otherwise useful data that my app would've been recording.

This is what I see when I try to connect from either GCE or AWS:

Code:
openssl s_client -connect owner-api.teslamotors.com:443
140495337194752:error:0200206E:system library:connect:Connection timed out:crypto/bio/b_sock2.c:110:
140495337194752:error:2008A067:BIO routines:BIO_connect:connect error:crypto/bio/b_sock2.c:111:
connect:errno=110

(i.e., they just don't ever establish a connection)

It'd be really nice if they could just tell us specific rules we could play by to access data from our cars. My app attempts to be fairly gentle while letting me plot details on my driving, charging, temperatures, etc...
 
It looks like Tesla may have firewalled off cloud providers from using their endpoints recently. This is a bit inconvenient for me as it seems to have happened just around the time I got evacuated from my home due to fires, so I'm missing a lot of otherwise useful data that my app would've been recording.

This is what I see when I try to connect from either GCE or AWS:

Code:
openssl s_client -connect owner-api.teslamotors.com:443
140495337194752:error:0200206E:system library:connect:Connection timed out:crypto/bio/b_sock2.c:110:
140495337194752:error:2008A067:BIO routines:BIO_connect:connect error:crypto/bio/b_sock2.c:111:
connect:errno=110

(i.e., they just don't ever establish a connection)

It'd be really nice if they could just tell us specific rules we could play by to access data from our cars. My app attempts to be fairly gentle while letting me plot details on my driving, charging, temperatures, etc...

I see that with my app too, and echo your sentiments. API requests form AWS fail but they do work from other networks.
 
  • Informative
Reactions: Missile Toad
Does the API update the location when the car is being transported, or only when the car is "on"?

I'm having my car shipped 700 miles, but I don't see it tracking in real time. :(

edit: I'm pretty sure it doesn't, because it's not. The driver has to pick up a McLaren next and move my car, so I suspect I'll get a location reading at that time.
 
Last edited:
Is there any list of the API calls that are disabled while the car is in motion? I wrote a modification to my Tesla app that honks the horn when my daughter exceeds X over the speed limit (and yes I do know about setting the speed limit in the app/car), but it doesn't work when she's in motion. I'd like to find a list of what is enabled vs not when it is in drive.
Thanks.
 
Does the API update the location when the car is being transported, or only when the car is "on"?

I'm having my car shipped 700 miles, but I don't see it tracking in real time. :(

edit: I'm pretty sure it doesn't, because it's not. The driver has to pick up a McLaren next and move my car, so I suspect I'll get a location reading at that time.
Only when the wheels are turning/moving - i had this when mine was being transported.
 
So, I'm having difficulty setting the soc_limit to anything other than 50% or 80%. When I run a command, like the following, in a bash session, I can only set the car to a soc_limit of 80. Any 'percent' less than 50, is set to 50, otherwise, the API makes it 80. Has anyone had any luck with this new version 10 API?

curl -s -H "Authorization: Bearer ${bear}" -H "Content-Type: application/json" --data '{"percent" : "100"}' -H "User-Agent: another client" \
-i "https://owner-api.teslamotors.com/api/1/vehicles/${veh}/command/set_charge_limit"
A typical API response is:
{"response":{"reason":"already_set","result":false}}
 
Hi

So i have used siri shortcuts for different stuff regarding Tesla, but im having a difficult time using

set_preconditioning_max

I have different shortcuts depending on wakeup, and running commands, then i have one main shortcut for triggering stuff, opening the car, setting charge limit, opening trunk/frunk (model x) all works fine.

But i cant get the above command to work.

The weird thing is that the output is

{"response":{"result":true,"reason":""}}