Cannot perform POST requests (User Provisioning API)

Hello,

I am encountering an issue with performing POST requests to the User Provisioning API. Details are as follows:


Nextcloud version (eg, 10.0.2): 12.0.2
Operating system and version (eg, Ubuntu 16.04): as per official nextcloud Docker container (using Kitematic (Alpha))
Apache or nginx version (eg, Apache 2.4.25): as per official nextcloud Docker container (using Kitematic (Alpha))
PHP version (eg, 5.6): as per official nextcloud Docker container (using Kitematic (Alpha))
Is this the first time you’ve seen this error?: yes

Can you reliably replicate it? (If so, please outline steps):

  1. Start official nextcloud Docker container
  2. Create a NextCloud admin account through the web front-end
  3. Wait 30 minutes or longer
  4. Start Postman Chrome extension
  5. Send the following request:

Request type: POST
URL: http://:/ocs/v1.php/cloud/users
Headers:
OCS-APIRequest:true
Authorization:Basic
Content-Type:application/x-www-form-urlencoded
Body:
userid:tom
password:tst13579

  1. The following response is received:

< ?xml version=“1.0”? >
< ocs >
< meta >
< status>failure< /status >
< statuscode>997< /statuscode >
< message >Password confirmation is required< /message >
< totalitems >< /totalitems >
< itemsperpage >< /itemsperpage >
< /meta >
< data/ >
< /ocs >

The issue you are facing:
I am unable to make a successful POST request to the User Provisioning API to create new users due to the error returned above. I have seen several posts on the NextCloud support forums and bug tracker that suggest this may be due to the need to confirm the admin user’s password for privileged actions as it times out after 30 minutes, but I do not believe this is possible through a POST request.

Any assistance would be greatly appreciated.

The output of your Nextcloud log in Admin > Logging:

Error ocs_api Failed addUser attempt with exception: A valid username must be provided 2017-09-07T11:22:04+0930

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php $CONFIG = array ( 'memcache.local' => '\\OC\\Memcache\\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'instanceid' => '', 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => ':', ), 'datadirectory' => '/var/www/html/data', 'overwrite.cli.url' => 'http://:', 'dbtype' => 'sqlite3', 'version' => '12.0.0.29', );

The output of your Apache/nginx/system log in /var/log/____:

I am unsure where to find this inside the folder structure of the official nextcloud Docker container.