Hey,
when i want to access a password protected share like this
oc = owncloud.Client.from_public_link(theHost, folder_password=thepassword)
oc.list("")
I recive this error:
Traceback (most recent call last):
File "C:\Users\me\PycharmProjects\pyocclienttest\main.py", line 4, in <module>
oc.list("")
File "C:\Users\me\PycharmProjects\pyocclienttest\venv\Lib\site-packages\owncloud\owncloud.py", line 469, in list
res = self._make_dav_request('PROPFIND', path, headers=headers, data=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\me\PycharmProjects\pyocclienttest\venv\Lib\site-packages\owncloud\owncloud.py", line 1815, in _make_dav_request
raise HTTPResponseError(res)
owncloud.owncloud.HTTPResponseError: HTTP error: 401
I have fiddled around a bit.
I got it to work by adding this header to the list and get_file function.
headers={"X-Requested-With" : "XMLHttpRequest"}
Does someone have the same problem or can confirm it?