Skip to content
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

Authentication issues #94

Closed
davglass opened this issue May 31, 2018 · 5 comments · Fixed by #96
Closed

Authentication issues #94

davglass opened this issue May 31, 2018 · 5 comments · Fixed by #96

Comments

@davglass
Copy link

Hey there! Ring just updated their authentication mechanism to be fully oAuth. I've already updated my nodejs based module and the details are here so you can patch yours too:

davglass/doorbot#16 (comment)

@tchellomello
Copy link
Owner

Awesome.. Thanks for the heads up!! Let's work on that now

@tchellomello
Copy link
Owner

I'm getting a lot of emails from people reporting this problem. I'm going to tackle this issue this weekend.

@tchellomello
Copy link
Owner

In [1]: from ring_doorbell import Ring

In [2]: ring = Ring('user', 'secret')
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
<ipython-input-2-377ce499396d> in <module>()
----> 1 ring = Ring('user', 'secret')

~/devel/python-ring-doorbell/ring_doorbell/__init__.py in __init__(self, username, password, debug, persist_token, push_token_notify_url, reuse_session, cache_file)
     51         if self._reuse_session:
     52             self.cache['token'] = self.token
---> 53             self._process_cached_session()
     54         else:
     55             self._authenticate()

~/devel/python-ring-doorbell/ring_doorbell/__init__.py in _process_cached_session(self)
     84         else:
     85             # first time executing, so we have to create a cache file
---> 86             self._authenticate()
     87 
     88     def _authenticate(self, attempts=RETRY_TOKEN, session=None):

~/devel/python-ring-doorbell/ring_doorbell/__init__.py in _authenticate(self, attempts, session)
    137 
    138         self.is_connected = False
--> 139         req.raise_for_status()
    140         return True
    141 

~/.virtualenvs/ring_doorbell/lib/python3.6/site-packages/requests/models.py in raise_for_status(self)
    933 
    934         if http_error_msg:
--> 935             raise HTTPError(http_error_msg, response=self)
    936 
    937     def close(self):

HTTPError: 401 Client Error: Unauthorized for url: https://api.ring.com/clients_api/session

@tchellomello
Copy link
Owner

Guys, could you check the PR #96 to see if that will fix the issue? Thanks!

@n5qm
Copy link

n5qm commented Jun 11, 2018

I applied the patches on my homeassistant installation manually and it works properly again. Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants