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.
Heh, but still wrong, I think. favorite, not fav right? Oh, and previous, not prev.
Actually no the API endpoints are abbreviated like that, here's a snippet from the official app's endpoints container.
Code:
  "MEDIA_TOGGLE_PLAYBACK": {
    "TYPE": "POST",
    "URI": "api/1/vehicles/{vehicle_id}/command/media_toggle_playback",
    "AUTH": true
  },
  "MEDIA_NEXT_TRACK": {
    "TYPE": "POST",
    "URI": "api/1/vehicles/{vehicle_id}/command/media_next_track",
    "AUTH": true
  },
  "MEDIA_PREVIOUS_TRACK": {
    "TYPE": "POST",
    "URI": "api/1/vehicles/{vehicle_id}/command/media_prev_track",
    "AUTH": true
  },
  "MEDIA_NEXT_FAVORITE": {
    "TYPE": "POST",
    "URI": "api/1/vehicles/{vehicle_id}/command/media_next_fav",
    "AUTH": true
  },
  "MEDIA_PREVIOUS_FAVORITE": {
    "TYPE": "POST",
    "URI": "api/1/vehicles/{vehicle_id}/command/media_prev_fav",
    "AUTH": true
  },
  "MEDIA_VOLUME_UP": {
    "TYPE": "POST",
    "URI": "api/1/vehicles/{vehicle_id}/command/media_volume_up",
    "AUTH": true
  },
  "MEDIA_VOLUME_DOWN": {
    "TYPE": "POST",
    "URI": "api/1/vehicles/{vehicle_id}/command/media_volume_down",
    "AUTH": true
  },
 
So Elon's tweet confirms new Summon features coming to AP v2+ hardware vehicles in about 6 weeks from now. Looking forward to them, however I don't have a AP v2 vehicle, I just missed that boat in 2016 by 6 weeks :'(

I guess this means one of you lucky ducks will need to do the dirty work on actually testing anything discovered from the official app's source ;)
 
Can anyone with a Model 3 confirm they are able to track their vehicle's live location while driving in the official Tesla app? Or if perhaps if there's a setting in the car that disables streaming? Try turning Summon off and try again, and the energy saver / always connected settings.

I'm seeing the official app set the initial position (from the drive state), but after sniffing traffic I'm seeing it fail to connect to the streaming endpoint with a "vehicle_disconnected" error. This is the exact same issue I've been seeing with Model 3s the past month in my own app I posted about earlier, trying to confirm this is a Tesla server-side error or not so anyone able to help would be great.
 
Can anyone with a Model 3 confirm they are able to track their vehicle's live location while driving in the official Tesla app? Or if perhaps if there's a setting in the car that disables streaming? Try turning Summon off and try again, and the energy saver / always connected settings.

I'm seeing the official app set the initial position (from the drive state), but after sniffing traffic I'm seeing it fail to connect to the streaming endpoint with a "vehicle_disconnected" error. This is the exact same issue I've been seeing with Model 3s the past month in my own app I posted about earlier, trying to confirm this is a Tesla server-side error or not so anyone able to help would be great.

It tracks my car in the official app, but I'm guessing it polls the drive_state endpoint as it seems to update every ~5s.
 
  • Like
Reactions: SG57
Anyone figured out the streaming API on the M3?
I've been debugging Model 3 streaming API for weeks now to no avail. After exhaustively snooping the official Tesla app and @bsproul 's account of ~5 second location updates (indicating drive state updates not streaming updates), I can only conclude streaming API is broken for Model 3s.

I'm seeing the exact same "vehicle_disconnected" results when using the official Tesla app as we see when connecting ourselves. Some times I have observed a "Vehicle is offline" value instead of the "vehicle_disconnected", but I've never received a success case on my own attempts or through using the official app only for Model 3.

I encourage all Model 3 owners to try out the official Tesla app and test if the Location screen is working as intended, meaning you get real-time updates including speed. Better yet if you're technically-minded try connecting to the streaming API yourself and witness successful data updates or failure due to "vehicle_disconnected".
 
  • Informative
Reactions: apacheguy