Closed GentoGaming closed 2 months ago
Have you followed the guide in the README and tried out the first example snippet? Do you still get the same error then?
This : import hashlib import pyotp totp = pyotp.TOTP('MY_TOTP_SECRET', digest=hashlib.sha1) print(totp.now()) Worked and gave me the code
from avanza import Avanza avanza = Avanza({ 'username': 'MY_USERNAME', 'password': 'MY_PASSWORD', 'totpSecret': 'MY_TOTP_SECRET' })
overview = avanza.get_overview()
This didnt work . self._authentication_session = response_body['authenticationSession'] KeyError: 'authenticationSession'
And logging into Avanza directly on their website using your username and password and totp-code works?
Just to clarify you should give the Avanza class the secret (that you get from avanza when enabling 2fa) that is used to generate the totp code and not the code generated by pyotp.
I dont know why i am getting this error , can anyone tell me how to fix ? self._authentication_session = response_body['authenticationSession'] KeyError: 'authenticationSession'