timdorr / tesla-api

🚘 A Ruby gem and unofficial documentation of Tesla's JSON API for the Model S, 3, X, and Y.
https://tesla-api.timdorr.com/
MIT License
1.98k stars 532 forks source link

How to call `mobile-app/*` endpoints? #714

Open mukundt opened 1 year ago

mukundt commented 1 year ago

I'm trying to access the Self Diagnostics feature, which I believe falls under mobile-app/macgyver/urgent-autodiag-result. But calling api('SERVICE_MACGYVER_DIAGNOSTIC_RESULT') returns a 404. Do I need to treat mobile-app/ endpoints differently?

core-hacked commented 1 year ago

Yes, these either fall under different urls or require different authentication / token generation.

devsaider commented 1 year ago

I was able to intercept requests between Tesla's latest android app and bff.

The URL looks like this (please note that i've intercepted another url): https://ownership.tesla.com/mobile-app/macgyver/activity-info/12345678?deviceLanguage=en&deviceCountry=US&ttpLocale=en_US&vin=5YJ3E1EB3JF000000

So far, from what i've tested, no special authentication or headers are required. Use the Bearer token as you would for other endpoints.

norenz92 commented 8 months ago

Anyone actually know how to fetch these endpoints?