Remote API-calls fails
Steps to reproduce
When requesting raw requests to API it always return http 401 unauthenticated, despite using correct username, password and auth method
Just send a raw request, with the admin-user:
curl https://admin:somepass@URL/ocs/v1.php/cloud/users -H "OCS-APIRequest: true"
The developers at HostBill, with their OwnCloud-module, have verified the issue in NextCloud. They say the API-call fails each time and I have manually tried the method above too. Have tested with other admin-accounts as well.
Expected behaviour
Return the objects asked for - anything but failture.
Actual behaviour
http 401 unauthenticated
Server configuration
Centos 7
Web server: cPanel
Database: MariaDB
PHP version: 7.0
Nextcloud version: (see Nextcloud admin page) 12.0.0
Updated from an older Nextcloud/ownCloud or fresh install: No.
Where did you install Nextcloud from: cPanel.
Signing status:
Are you using external storage, if yes which one: local/smb/sftp/... No.
Are you using encryption: yes/no No.
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... No.
parallel discussion in the forum: https://help.nextcloud.com/t/api-broken-in-nextcloud/15099
Works totally fine here:
curl -u admin:admin http://URL/ocs/v1.php/cloud/users -H "OCS-APIRequest: true"
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<users>
<element>admin</element>
<element>test</element>
<element>test2</element>
</users>
</data>
</ocs>
Maybe the password contains a wrongly encoded password and fails due to this?
And the forum post shows that it is problem in their (HostBill) code of a Nextcloud app.
Closing