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.
it would be nice to be able to see when you car is en route.
I wanted to track it across the factory floor! I can understand why they wouldn't do it, because there's a risk you could start sending commands to the car prior to taking delivery. Of course, they could separate the issuance of a token from the actual VIN association step. Would allow someone to develop an application without having to have possession of a car.
 
I'm aware that some API endpoints are no longer functional, and they're obviously endpoints that aren't exposed through the current version of the app. For example, the endpoint to open a trunk. Does anyone know if the trigger_homelink endpoint still works? I don't have a garage door to try it out with.
 
  • Like
Reactions: SG57
I can't find a way to edit my previous post, my apologies.

I don't know where the library in question (TeslaJS) got that endpoint from, but it seems to me like it might be gone as it only responds with 400 (the same response as openTrunk, which also appears to be gone). I was able to get it working with the WebSocket streaming server, so thanks for that tip.
 
  • Like
Reactions: SG57
Anyone here with an updated 8.1 firmware on their vehicle notice a change in the 'car_type' property for the vehicle state data?

I'll report back on the change once I acquire more detail on the change. For what I have seen, the expected car type values to this day are: "x", "s", "s2", or "3". Perhaps they've added or changed one.
 
Bit of a strange post there. Please post the previous and new values. What more detail are you acquiring?

Mine is the same "s2"
I can now confirm after collecting more data from 8.1 firmware vehicles (example firmware: 2017.40.0) that there are new values being returned for the car_type field.

The new values I have seen are:
  • models
  • models2
As the old values were just 's' and 's2', I project this new naming scheme also applies to the other two models - so they are now 'modelx' and 'model3'.
 
  • Informative
Reactions: dpskipper
I can now confirm after collecting more data from 8.1 firmware vehicles (example firmware: 2017.40.0) that there are new values being returned for the car_type field.

The new values I have seen are:
  • models
  • models2
As the old values were just 's' and 's2', I project this new naming scheme also applies to the other two models - so they are now 'modelx' and 'model3'.
Mine returns "car_type":"models2"
 
Strange, my app that I built for myself has been working for well over a year and today I get the "
private, must-revalidate"

I signed in again, got a new token and still the same issue.
I should add that I am able to retrieve vehicles fine but any other API call such as get data fails with the above error ?

Thoughts?
 
Have you been using the token revalidate method for a year? (Where you input the old token, and tesla returns new one, without needing password)

That is my only guess for what that means...

My app gets a new token every 2months to avoid the expiry. I am just thinking the OWNERAPI_CLIENT_ID and SECRET may have changed. Weird that it just stopped working this afternoon around 1pm EST.

Ok, wasn't that. I am using the ones issued in Feb2017.

I am at a loss at whats causing it to think it needs to revalidate for api/1/vehicles/VEHID/data API call ? :(
 
Does the official mobile app work?

If it does then try other third party apps, try and eliminate your own code...

Not sure if that would help, but its what I would do...
Yep official app works.
My code has been code stable for over a year, well apart from an update for iOS11 earlier in the summer but its been working fine and was working on my drive to work fine and then just stopped around 1pm when nothing else had been touched. Its weird I can log in and get a token via the REST API's, retrieve a list of vehicles, just that one API fails