How to add Addon Domains using Cpanel API or something?

roberthayden

Registered
Aug 21, 2020
4
0
1
unknown
cPanel Access Level
Website Owner

roberthayden

Registered
Aug 21, 2020
4
0
1
unknown
cPanel Access Level
Website Owner
I try to use xmlapi and do:


Code:
require_once __DIR__ . "/../../utils/xmlapi.php";

$xmlapi = new xmlapi("IP");
$xmlapi->set_port(2082);
$xmlapi->password_auth("USER", "PASS");
$xmlapi->set_debug(1);

$result = $xmlapi->api2_query("USER", 'AddonDomain', 'addaddondomain', array('dir' => 'customdomain1.com', 'newdomain' => 'domain1.com', 'subdomain' => 'domain1'));

var_dump($result);
but the result is null. There is no error
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston