python-ring-doorbell
python-ring-doorbell copied to clipboard
getting error when attempting to authenticate
When running the test.py file, i get this error. Any idea how to proceed?
➜ python-ring-doorbell git:(master) python3 test.py
Username: [email protected]
Password:
2FA code: 111111
Traceback (most recent call last):
File "test.py", line 29, in main
auth.fetch_token(username, password)
File "/home/pi/ring/python-ring-doorbell/ring_doorbell/auth.py", line 46, in fetch_token
headers=headers,
File "/home/pi/.local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 366, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope)
File "/home/pi/.local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 448, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/home/pi/.local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in parse_token_response
validate_token_parameters(params)
File "/home/pi/.local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 451, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 49, in <module>
main()
File "test.py", line 31, in main
auth.fetch_token(username, password, otp_callback())
File "/home/pi/ring/python-ring-doorbell/ring_doorbell/auth.py", line 46, in fetch_token
headers=headers,
File "/home/pi/.local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 366, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope)
File "/home/pi/.local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 448, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/home/pi/.local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in parse_token_response
validate_token_parameters(params)
File "/home/pi/.local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 451, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
Looking through other issues on this repo. This seems to be related to the default project id. Changing the project id on the authentication methods should work.
auth = Auth("NEW_PROJECT/1.0", None, token_updated)
Just found this repo. Nice.
The workaround works for me. Thanks @OldStarFox
Thanks
-paul
also worked on my side
For me
auth = Auth("YourProject/1.0", None, token_updated)
works, but "MyProject" doesn't. Maybe any change works.
Changing from the default auth project also worked for me!
I'm having this issue as well and the reported fix here doesn't seem to work. After you enter your username and password, should a prompt appear to enter your 2FA code? That's not happening for me, I just get an error. Seems like the folks on this thread are getting the same thing too https://github.com/tchellomello/python-ring-doorbell/issues/315
This is now updated and working in master from PR https://github.com/tchellomello/python-ring-doorbell/pull/358