-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Safety Score endpoints data #37
Comments
It seems that some of the new endpoints require a different base URL, but there is still not much documentation about this. Take a look at timdorr/tesla-api#444 and timdorr/tesla-api#445 for some details. |
As suggested here: timdorr/tesla-api#445 (comment), I have removed JWT usage for Owner API access and I use the OAuth2 SSO token for everything in f42b423. This commit also adds the option to use an absolute URL as an argument to from teslapy import Tesla
with Tesla('elon@tesla.com') as tesla:
vehicles = tesla.vehicle_list()
url = 'https://akamai-apigateway-vfx.tesla.com/safety-rating/daily-metrics'
print(tesla.get(url, params={'vin': vehicles[0]['vin'],
'deviceLanguage': 'en',
'deviceCountry': 'US'})) Can you pull the latest commit and give this a try? |
FYI, you need to add ...
print(tesla.get(url, params={'vin': vehicles[0]['vin'],
'deviceLanguage': 'en',
'deviceCountry': 'US',
'timezone': 'UTC'})) |
Thanks, I have added this example to the readme! |
yw! Now the only thing I'm struggling to figure out is what the numbers mean in the |
I'm getting a 400 on this request, but maybe it's because I'm not in the US and my car isn't measuring safety score?
|
Yes, as far as I know it's US only. |
Anyone managed to get Safety Score data? I see the end points in endpoints.json, but they don't seem to work with e.g. the cli.py example.
The text was updated successfully, but these errors were encountered: