Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register
  • We just completed a significant update, but we still have some fixes and adjustments to make, so please bear with us for the time being. Cheers!

Model S REST API

Dan203

Active Member
Jul 10, 2019
1,418
953
Northern Nevada
I also have a project that runs on Google Firebase that generates and refreshed tokens that seems to still be working fine. (currently only used for my own car, but I might release as a product eventually)
 

Gwgan

Almost a wagon
Aug 11, 2013
2,837
2,089
Maine
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.
 

Gwgan

Almost a wagon
Aug 11, 2013
2,837
2,089
Maine
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.
 

dlsspy

Member
Jan 9, 2018
83
91
San Jose, CA
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...
 

Gol4

Member
Nov 21, 2016
236
250
San Jose, CA
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

HankLloydRight

No Roads
Jan 18, 2014
12,829
10,842
Connecticut
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:

brianman

Burrito Founder
Nov 10, 2011
17,515
2,980
Wakeup seems to have stopped working via the API for me recently (last month). :(

(In case it matters, Model 3.)
 

brianman

Burrito Founder
Nov 10, 2011
17,515
2,980
Wakeup seems to have stopped working via the API for me recently (last month). :(

(In case it matters, Model 3.)
Actually, not sure about that.

It's actually failing earlier in my sequence.

Is this URL no longer valid?
Code:
https://owner-api.teslamotors.com/api/1/vehicles
 

tornado

Member
Dec 7, 2012
47
9
Seattle-Area
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.
 

brook90

Member
Sep 7, 2019
41
69
UK
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.
 

Missile Toad

Member
Aug 30, 2016
581
534
Houston
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}}
 

henrikhoe

New Member
Sep 30, 2020
1
0
Norway
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":""}}
 

brianman

Burrito Founder
Nov 10, 2011
17,515
2,980
I wrote a modification to my Tesla app that honks the horn when my daughter exceeds X over the speed limit
That seems like a bad idea.

Maybe just change the radio to the oldies station and bounce the volume between 1 and 5 every few seconds. At least that way, drivers around her aren't impacted directly.
 

brianman

Burrito Founder
Nov 10, 2011
17,515
2,980
My REST stuff died a few days ago (i.e. no data in October at all for me). Dunno if it's server-side or not yet. :(
 

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top