Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

specifying a package name in creating a cpanel account thru xmlapi

Discussion in 'cPanel Developers' started by niceboy, Aug 31, 2016.

  1. niceboy

    niceboy Active Member

    Joined:
    Sep 29, 2011
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    56
    cPanel Access Level:
    Root Administrator
    Hi,

    How to specify a package name in creating a cpanel account thru xmlapi?

    I get error "Sorry, you must choose a package." when I use sample php xmlapi account creation script..

    I'm trying this on a reseller account and specified everything correctly like host/username/pass/etc.

    How to tell the script that I want to use 'resell_plan1' package with this account creation?

    Code:
    include_once '../xmlapi.php';
    
    $ip = getenv('REMOTE_HOST');
    $root_pass = getenv('REMOTE_PASSWORD');
    
    $xmlapi = new xmlapi($ip);
    $xmlapi->password_auth("root",$root_pass);
    
    $xmlapi->set_debug(1);
    
    $acct = array( username => "someuser", password => "pass123", domain => "thisdomain.com");
    print $xmlapi->createacct($acct);
    thank you.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,180
    Likes Received:
    1,935
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice