Closed cdeblois closed 10 years ago
That error usually indicates that your client ID/secret are incorrect. Please could you sign in to the developer portal at http://dev.mendeley.com, generate a new secret (remember to click on the Submit button), update your config.yml and try again?
Actually, this is due to stricter validation introduced in a recent version of oauthlib. I'll fix this for now by enforcing an earlier version of oauthlib, and I'll look into making the API compatible with the newer oauthlib separately.
OK, please could you upgrade to the latest SDK? You can do this by running the following:
git pull
pip install -U -r requirements.txt
Seems I get the same error.
@dev1: mendeley-api-python-catalog-example $> python mendeley-catalog.py Traceback (most recent call last): File "mendeley-catalog.py", line 8, insession = mendeley.start_client_credentials_flow().authenticate() File "/usr/local/lib/python2.7/dist-packages/mendeley/auth.py", line 32, in authenticate token = self.oauth.fetch_token(token_url, auth=auth, scope=['all']) File "/usr/local/lib/python2.7/dist-packages/requests_oauthlib-0.4.2-py2.7.egg/requests_oauthlib/oauth2_session.py", line 199, in fetch_token self._client.parse_request_body_response(r.text, scope=self.scope) File "/usr/local/lib/python2.7/dist-packages/oauthlib/oauth2/rfc6749/clients/backend_application.py", line 156, in parse_request_body_response self.token = parse_token_response(body, scope=scope) File "/usr/local/lib/python2.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 303, in parse_token_response validate_token_parameters(params, scope) File "/usr/local/lib/python2.7/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 310, in validate_token_parameters raise_from_error(params.get('error'), params) File "/usr/local/lib/python2.7/dist-packages/oauthlib/oauth2/rfc6749/errors.py", line 239, in raise_from_error raise cls(**kwargs) oauthlib.oauth2.rfc6749.errors.InvalidClientError
The issue was the yaml file and the keys needing to be regenerated.
I cloned the repo. I created app:
I updated the config.yaml with above key and secret.
I ran the script and got the below.
Please help.
Thanks