python-ring-doorbell icon indicating copy to clipboard operation
python-ring-doorbell copied to clipboard

The client is not authorized to request a token using this method

Open franciozzy opened this issue 4 years ago • 0 comments

Maybe I'm doing something wrong, but I was hoping my setup would "just work" out of the box.

On Debian 10, I apt-installed python3-requests-oauthlib and pip3-installed pytz (other dependencies were already satisfied). Then I git cloned master's tip (a70e38fa) and run "python3 ./test.py" to the following:

Username: [email protected]
Password:
Traceback (most recent call last):
  File "./test.py", line 49, in <module>
    main()
  File "./test.py", line 29, in main
    auth.fetch_token(username, password)
  File "/root/python-ring-doorbell/ring_doorbell/auth.py", line 46, in fetch_token
    headers=headers,
  File "/usr/lib/python3/dist-packages/requests_oauthlib/oauth2_session.py", line 244, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 411, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 379, in parse_token_response
    validate_token_parameters(params)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 386, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/errors.py", line 415, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.UnauthorizedClientError: (unauthorized_client) The client is not authorized to request a token using this method.
root@localhost:~/python-ring-doorbell#```

franciozzy avatar Apr 13 '21 08:04 franciozzy