I am trying to create the user through owncloud User Provisioning API, when trying to request the below api:
curl -X POST http://admin:secret@localhost/owncloud/ocs/v1.php/cloud/users -d userid="user1" -d password="user1"
I get the response:
<?xml version="1.0"?>
<ocs>
<meta>
<status>failure</status>
<statuscode>997</statuscode>
<message>Unauthorised</message>
</meta>
<data/>
</ocs>
That issue was causing due to the secret
contained the combination of special character like @
. Bellow is sample link
https://admin:secret@demo.owncloud.com
look like
https://admin:abc@12@demo.owncloud.com, where abc@12
is a secret/password.
Due to two @
symbol in secret, it was taking the domain from the @12
instead of @demo
.