拒绝访问Cpanel API


Cpanel API Access denied

我使用XML api 2

$xmlapi = new xmlapi('MY IP Address');
$xmlapi->password_auth("root",'My Cpanel password');
$xmlapi->set_output("json");
$xmlapi->set_debug(1);
print $xmlapi->api2_query($account, "Email", "listpopswithdisk" );

但是它给出了这个错误。

{"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}}

如何解决此错误。

检查端口设置-

$xmlapi->set_port(2083); //2082 if not using secure connection