Coder Social home page Coder Social logo

Comments (4)

github-actions avatar github-actions commented on August 28, 2024

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.

from wyzecam.

mmalloy avatar mmalloy commented on August 28, 2024

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)

from wyzecam.

kroo avatar kroo commented on August 28, 2024

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 Client object in that library via the _token attribute:

from wyze_sdk import Client
client = Client(username=..., password=..., totp_key=...)
access_token = client._token

from wyzecam.

mmalloy avatar mmalloy commented on August 28, 2024

Thanks @kroo! That was certainly the issue. Just turning off the two-factor authentication took care of the problem.

from wyzecam.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.