The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    39
    Likes Received:
    0
    Trophy Points:
    6
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page