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

cryptyk

Member
Jul 8, 2015
374
127
United States
Does nevermind mean you found the answer (please share) or that you no longer need to know the answer? I haven't tried it but believe I understand that the device sends a gps loc with the homelink command.

Nevermind was referencing my previous post about closing the charge port doot. It's in the APIs harvested from the ios app. Instead of charge_port_door_open, you pass charge_port_door_close. I haven't tested it yet.

I still haven't started playing around with homelink/summon yet.
 

ACDriveMotor

Member
Aug 11, 2013
890
24
Seattle, WA
I keep tokens for users until they don't work anymore. Once they expire, I email the user and ask them to come back and re-enter their password. I don't think there's any other responsible way to handle it in a production application. Storing passwords is just bad news. I've been wanting to make a library that handles all of the above as a service and exposes Oauth2 for developers. It's in a long line of ideas that I don't have enough time to do :(

What if the user doesn't want you to store the token any longer. Do you just throw it away at that point? Is there no OAuth way to invalidate an existing token before expiry?
 

cryptyk

Member
Jul 8, 2015
374
127
United States
What if the user doesn't want you to store the token any longer. Do you just throw it away at that point? Is there no OAuth way to invalidate an existing token before expiry?

If a user deletes their account, I delete the token along with all of their other data.

If a user wants to revoke a token, they can go change their password on MyTesla. This has two issues though:
1) There's a delay that can last hours before the old token is rejected in API calls.
2) It invalidates all tokens that have been requested, so you can't just revoke one application.
 

anking

New Member
Jan 29, 2016
4
1
Pittsburgh, PA
Every request except for the "$tesla->vehicles()" is being returned to me with this:

stdClass Object ( [response] => [error] => not_found [error_description] => )

I figured it out. I was using "vehicle_id" returned by vehicle list request instead if "id" for my car id. Once changed everything worked.
 

ahimberg

Member
Aug 8, 2010
349
0
Woodinville, WA
not a resT API question, but if anyone has played with recoloring Tesla's PNGs could you PM me?

The latest Tesla apps don't have separate PNGs for each color of the ModelS/X anymore, instead they're repainting them on the fly - which I'm trying to do and add model X graphics to my app, but failing to get the same results -- even with an Android test app that is seeming making the same calls.
 

Jdeck

Member
Dec 19, 2015
422
459
Chicago
Has anyone noticed any issues with your MS sleeping over the past few days? My car hasn't gone into sleep mode since late Thursday night for some reason. Anyone running teslams or visible tesla that supports sleep mode and notice this?
 

Jdeck

Member
Dec 19, 2015
422
459
Chicago
Has anyone noticed any issues with your MS sleeping over the past few days? My car hasn't gone into sleep mode since late Thursday night for some reason. Anyone running teslams or visible tesla that supports sleep mode and notice this?
Never mind. Teslalog.com randomly started monitoring my car Thursday night. Can't disable or delete my account. :mad:
 

HankLloydRight

No Roads
Jan 18, 2014
12,821
10,834
Connecticut
I did last night, but it's still monitoring. I guess the keys stay alive even if you change the password.

I reported this bug to Tesla several months ago, and a developer contacted me about it. He said previously there was an issue with token expiration, and it was quickly fixed as a result.

At that time, changing the password would expire all existing tokens. (I tested it, it worked). But I guess that's not working any more?

here's the old thread: iPhone app login credentials and a big security hole?
 

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