Csrf check failed errror when registerting user using api in nexcloud

i m calling user registration api using curl request in php
but i m getting following response.

csrf check failed

my curl request is as follows.

$ownAdminname=“xxxx”;
$ownAdminpassword=“xxx”;
$ownconnect=“https://".$ownAdminname.":".$ownAdminpassword."@local.ngageapp.com”;
$username=‘xxxx’;
$password=‘xxx’;
$url = “{$ownconnect}/ocs/v1.php/cloud/users”;
$ownCloudPOSTArray = array(‘userid’ => $username, ‘password’ => $password );
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $ownCloudPOSTArray);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, $ownAdminname.":".$ownAdminpassword);
$response = curl_exec($ch);
curl_close($ch);

Please I need help with this issue. Thanks in advance!