p4lsec / fordpass

Python3 script to interact with and retrieve data about your FordPass enabled vehicle
11 stars 5 forks source link

No longer working? #1

Open TechnicalLee opened 2 years ago

TechnicalLee commented 2 years ago

Appears to have stopped working since the beginning of the year. Perhaps Ford changed something with the server. Error output for a -n:

Traceback (most recent call last): File "/Users/Lee/fordpass/fordpass.py", line 195, in main() File "/Users/Lee/fordpass/fordpass.py", line 53, in main print(getStatus()) File "/Users/Lee/fordpass/fordpass.py", line 84, in getStatus return requests.get(f"https://usapi.cv.ford.com/api/vehicles/v4/{config['config']['vin']}/status", headers = header).json() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

p4lsec commented 2 years ago

Hello,

It looks like Ford has switched this application to using a different authentication method (SSO). I'll try to find some time to figure out how to make this work, but no promises. At a glance, they're using a modern SSO solution and we may not be able to make the requests using Python. Thanks for bringing this to my attention!

BillyCroan commented 1 year ago

This appears the same thing that connected-car-python-sdk ran into at: https://github.com/ianjwhite99/connected-car-python-sdk/issues/58 And the same guy maintains a node fork with a fixing patch at https://github.com/ianjwhite99/connected-car-node-sdk/commit/25b961512427769f7fa0440c5eca0f647a115f92