I have the API creating an account on a dedicated server for a user fine, creating email addresses fine as well, however when I attempt to create an mysql database through the API, I get error message 'Access Denied', even though access is root.
The code I am trying to use:
$xmlapi = new xmlapi($host);
$xmlapi->password_auth("".$root_user."","".$root_pass."");
$xmlapi->set_debug(1);
$xmlapi->set_output('array');
$xmlapi->set_port('2083');
//create database
$createdb = $xmlapi->api1_query($root_user, "Mysql", "adddb", array($dbname));
and the error data I am getting back:
URL: https://delta1.powerstorm.net:2083/xml-api/cpanel
DATA: cpanel_xmlapi_user=root&cpanel_xmlapi_module=Mysql&cpanel_xmlapi_func=adddb&cpanel_xmlapi_apiversion=1&arg-0=site
Authentication Header: Authorization: Basic cm9vdDphY3Jtp3MxOTY1
RESPONSE:
<?xml version="1.0" ?>
<cpanelresult>
<error>Access denied</error>
<data>
<result>0</result>
<reason>Access denied</reason>
</data>
</cpanelresult>
Any ideas on why this one part is failing when everything else works fine?