I have tried rest api in which i got reference from their document.But somehow its not working so anyone please help me out if possible.
I have tried change_password api with below code :
$url='192.168.1.72:5280/api/change_password/';
$login="key";
$password='secret';
$request=null;
$info=array("key"=> "secret",
"args"=>array("87999","192.168.1.72:5280","test"),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($info));
$output=curl_exec($ch);
curl_close($ch);
print_r($output);
exit;
I got Response like below :
{"status":"error","code":31,"message":"Command need to be run with admin priviledge."}
Document link is :https://docs.ejabberd.im/admin/api/
FYI : i am using 16.08.28 version if that can help