4
votes

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>
1
Are you sure you're using the right admin:secret username/pass combination? That's the same error you get when the admin's password is incorrect. Also, make sure you're pointing to the right http/https endpoint as these might yield different results. You can test against https://admin:[email protected] to see this working.Alfageme

1 Answers

3
votes

That issue was causing due to the secret contained the combination of special character like @. Bellow is sample link

https://admin:[email protected]

look like

https://admin:abc@[email protected], where abc@12 is a secret/password.

Due to two @ symbol in secret, it was taking the domain from the @12 instead of @demo.