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!

Create account without a plan via WHM API

Discussion in 'cPanel Developers' started by Oliver Etchebarne, Jun 13, 2018.

  1. Oliver Etchebarne

    Joined:
    Aug 15, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Perú
    cPanel Access Level:
    Root Administrator
    Hi.

    I see this question a lot, but no a definitive answer. I want to create accounts without a plan, defining everything via the API call parameters.

    But if I omit the 'plan' parameter in the 'createacct' function call, it fails with "Sorry, you must choose a package.". If specify a plan, the "quota" (and other parameters) are ignored, and instead it uses the plan values, which is the thing I want to avoid.

    Am I missing something? Thanks for your help! BTW I'm using WHM v70.0.48
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Are you omitting it meaning completely leaving plan out of the function or are you just leaving it blank like plan=

    I just tested using the command line:

    Code:
    whmapi1 createacct username=example domain=example.com
    reason: Account Creation Ok


    Package: default
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Oliver Etchebarne

    Joined:
    Aug 15, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Perú
    cPanel Access Level:
    Root Administrator
    Thanks @Jcats ! :)

    Actually, "whmapi1" uses the "default" package (opposite to no package). But I thought perhaps it was a privilege issue ("whmapi1" uses "root" user), and that was it :-D It turns out the reseller user I was using to create the accounts didn't have the 'quota' privilege (among others) enabled.

    Thanks again! ;)
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,815
    Likes Received:
    275
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Glad to hear you were able to find a resolution to your issue @Oliver Etchebarne I should point out that by default the "default" package has everything unlimited so it's really not imposing any restrictions unless the default has been modified.

    It's there to ensure uniformity of accounts that aren't assigned a package.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Oliver Etchebarne likes this.
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