- Code: Select all
head = {'Authorisation': u'Bearer abcdefghihjklmnopqrstuvwyx'}
req = Request("https://owner-api.teslamotors.com/api/1/vehicles/123456789/data_request/vehicle_config", headers=head)
resp = urlopen(req)
Those three lines, with an appropriate auth code, should retrieve a JSON of vehicle data.
Instead they're instantly (<1 second) returning HTTPError 408: Request Timeout
I've added timeout=30 but it still fails in <1 second.
- Code: Select all
head = {'Authorisation': u'Bearer abcdefghihjklmnopqrstuvwyx'}
req = Request("https://owner-api.teslamotors.com/api/1/vehicles/123456789/data_request/vehicle_config", headers=head)
resp = urlopen(req,timeout=30)
If I modify the auth to an invalid one, it returns 401 Unauthorised, so I know the auth is ok.
Any suggestions?
Peter