shubhamdipt / passbolt-python-api

An Api for passbolt in python
MIT License
12 stars 15 forks source link

Requests fail with Passbolt version 3.2.0 #8

Closed svenseeberg closed 3 years ago

svenseeberg commented 3 years ago

Hi,

thanks for this cool project.

After upgrading Passbolt to version 3.2.0 today I receive the following error messages:

     with passboltapi.PassboltAPI(config_path=path) as passbolt:
  File "/usr/local/lib/python3.7/dist-packages/passbolt_python_api-0.1.2-py3.7.egg/passboltapi/__init__.py", line 40, in __init__
    self._login()
  File "/usr/local/lib/python3.7/dist-packages/passbolt_python_api-0.1.2-py3.7.egg/passboltapi/__init__.py", line 67, in _login
    encrypted_token = r.headers["X-GPGAuth-User-Auth-Token"]
  File "/usr/local/lib/python3.7/dist-packages/requests-2.22.0-py3.7.egg/requests/structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'x-gpgauth-user-auth-token'

The response for the /auth/login.json returns a "message": "There is no user associated with this key. No key id set.",.

I'll investigate how the API changed and let you know.

svenseeberg commented 3 years ago

Has been fixed in the Passbolt API.