Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Nov 2010
    Posts
    7

    Question WHM account creation using the cpanel api

    Hi all,

    I'm getting the following error while trying to create an account using the cpanel api which is https://example.com:2087/xml-api/cre...s=0&reseller=0.

    and the error is: Array ( [result] => Array ( [0] => Array ( [status] => 0 [statusmsg] => Sorry, that's an invalid domain [rawout] => [options] => ) ) )

    i have given all the parameters correctly.
    Do i need to change any setting in the cpanel to allow api account creation.
    Last edited by manigandan; 01-19-2011 at 03:58 AM.

  2. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default Re: WHM account creation using the cpanel api

    Hi manigandan,

    The domain in your example looks fine. However, the example does look like there might be other issues. Below I've broken the URL into pieces; the "contact email" key needs to be one word (ie, 'contactemail') and the email address will need to not have a space either.
    Code:
    https://example.com:2087/xml-api/createacct?
    username=myuser&
    plan=basic%20&
    ip=n&
    cpmod=x3&
    password=h@rd2gu3ss!p@ss&
    contact%20email=username%20@domain.tld&      <-- "contactemail=username@domain.tld"
    domain=domain.tld&
    useregns=0&
    reseller=0
    Other than that, nothing stands out that could be causing this.

    Ensure that all you parameters are correct. If one parameter is off, it could throw the rest off too.

    Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  3. #3
    Member
    Join Date
    Nov 2010
    Posts
    7

    Default Re: WHM account creation using the cpanel api

    Hi DavidN,

    Thanks for your reply. I have corrected that issue and checked all the parameters that i'm using with the api. All parameters are correct only. Is there any thing that i need to change in the cpanel to allow the api to create an account?

    Regards,
    manigandanta

  4. #4
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default Re: WHM account creation using the cpanel api

    Quote Originally Posted by manigandan View Post
    Is there any thing that i need to change in the cpanel to allow the api to create an account?
    Nope. As long as you are authenticated as root or a reseller (with the proper permissions respective of the action you are performing) then you can utilized the XML-API to its full capacity, just like WHM.

    Are you still getting the same error message?

    Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  5. #5
    Member
    Join Date
    Nov 2010
    Posts
    7

    Thumbs up Re: WHM account creation using the cpanel api

    Thanks for your support DavidN. I have got the result. Onceagain thanks for your help.


    Regards,
    manigandanta.
    Last edited by manigandan; 01-20-2011 at 09:59 PM.

Similar Threads & Tags
Similar threads

  1. Account Creation Limits refers to WHM account or cPanel account?
    By alphareseller in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-01-2011, 07:02 PM
  2. Email Account Creation Using XML api ? Need Help...
    By niwre_17 in forum cPanel Developers
    Replies: 2
    Last Post: 03-08-2011, 09:13 PM
  3. WHM account creation using the cpanel api
    By manigandan in forum New User Questions
    Replies: 0
    Last Post: 01-18-2011, 11:38 PM
  4. API to interface with WHM for creation/suspension?
    By housefire in forum cPanel Developers
    Replies: 1
    Last Post: 12-13-2008, 10:33 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube