Closed j450h1 closed 3 years ago
Is MFA mandatory?
Looks like I forgot that I had MFA enabled. I opened up Google Authenticator and quickly got the code before it disappeared and now this is working like a charm!
with teslapy.Tesla('{my_email}, '{my_password}', lambda: '{MFA_CODE_FROM_AUTHENTICATOR_APP}') as tesla:
tesla.fetch_token()
vehicles = tesla.vehicle_list()
print(vehicles)
Traceback (most recent call last): File "", line 2, in
File "/Users/jas/github/TeslaPy/teslapy/teslapy.py", line 139, in fetch_token
response = self._check_mfa(oauth, transaction_id)
File "/Users/jas/github/TeslaPy/teslapy/teslapy.py", line 158, in _check_mfa
raise ValueError('
passcode_getter
callback is not set') ValueError:passcode_getter
callback is not set