EnterpriseyIntranet / nextcloud-API

NextCloud OCS API for Python
GNU General Public License v3.0
27 stars 27 forks source link

Error: 'Please specify a valid user' #54

Open jatin-bhatia-zz opened 4 years ago

jatin-bhatia-zz commented 4 years ago

Hi @matejak ,

When I try to create an upload using the following code, I get the error below: "Please specify a valid user". But I am creating a public link, so what user do I need to specify?

Can you please help with what I am not doing correctly? Would really appreciate that. Thanks.

nxc = NextCloud(endpoint=NEXTCLOUD_URL, user=NEXTCLOUD_USERNAME, password=NEXTCLOUD_PASSWORD, json_output=to_js)

aa = nxc.create_share('/Reports/sample_leads_data_for_testing.tsv', ShareType.PUBLIC_LINK) print(aa.full_data)

The error I get is as follows:

{'ocs': {'meta': {'status': 'failure', 'statuscode': 404, 'message': 'Please specify a valid user'}, 'data': []}}