-
Notifications
You must be signed in to change notification settings - Fork 15
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
Login access_token and refresh_token #57
Comments
Hello @mmalloy, thank you for your interest in our work! If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. |
A few more detail showing the error: >>> import wyzecam >>> auth_info = wyzecam.login(email, password) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wyzecam/api.py", line 49, in login return WyzeCredential.parse_obj(dict(resp.json(), phone_id=phone_id)) File "pydantic/main.py", line 578, in pydantic.main.BaseModel.parse_obj File "pydantic/main.py", line 406, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 3 validation errors for WyzeCredential access_token none is not an allowed value (type=type_error.none.not_allowed) refresh_token none is not an allowed value (type=type_error.none.not_allowed) mfa_options value is not a valid dict (type=type_error.dict) |
hey @mmalloy -- it looks like you have 2-factor authentication turned on (it's asking you to go through an extra step of auth, entering in a code via sms). I haven't personally figured out how this works, but I believe others have -- consider using https://github.com/shauntarves/wyze-sdk? It looks like you can get the access token from the
|
Thanks @kroo! That was certainly the issue. Just turning off the two-factor authentication took care of the problem. |
The response from the Wyzecam login API returns
'access_token': None, 'refresh_token': None
even though login appears to be successful.
Here's a minimum working example:
The text was updated successfully, but these errors were encountered: