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.

Automating Account Creation Question

Discussion in 'cPanel Developers' started by professordave, Jul 8, 2017.

  1. professordave

    professordave Registered

    Joined:
    Jul 8, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    California
    cPanel Access Level:
    Reseller Owner
    I am a former developer but moved away over time since code became mature needed little maintenance. Used to code in the .net platform. I am working on new project now, providing my students with access to web hosting and training to create basic web sites. I have a lot of sign up work to do and would like to automate this. I basically use a reseller account so each semester I can set up 100+ students. But this is slow and time consuming and I know as developer I am wasting my time!

    I need to provide sign up form to students so that I can take input of fname, lname, domain name, email address and create CPanel account. Then send email to student with url, login and pw. Next step is on border/outside cpanel but I mention it for completeness... it would be ideal to follow on with installing wordpress, creating user, installing starter site, etc. if possible.

    The question I am asking is whether I should try to now become developer in this new set of tools and languages, (I have probably coded in 30+ languages since 1985, all the way back to Prolog, and then coming forward! So what's a couple more tools?) Or should I just hire someone?

    Well, so to start I thought I would ask for pointers for a beginner such as myself, so I can start to read and see what the learning curve might be? A little jump into the fire trial... I have always enjoyed the satisfaction of being able to whip up some code for my project, and am wondering if this is the next chance for some more of that. Any loungers out there that care to weigh in? Much appreciated!
     
    #1 professordave, Jul 8, 2017
    Last edited by a moderator: Jul 8, 2017
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,404
    Likes Received:
    53
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    The easiest way is to have something like WHMCS, which has API that communicates directly with your reseller account and when a user signs in, it automatically create the account and sends in a mail directly to the user.. This is something that you can implement. This is what most of hosting provider does for their automation.. You can also search for alternative free solutions for WHMCS if you want that meets your requirement..
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The previous post is correct. WHMCS is very helpful if you want an application that handles the automatic account setup for you. That said, should you prefer to create your own custom scripts, the following document is a good place to start:

    Software Development Kit Home - Software Development Kit - cPanel Documentation

    Here's a link to the specific WHM API 1 function used to create new accounts:

    WHM API 1 Functions - createacct - Software Development Kit - cPanel Documentation

    The PHP client class, with examples, is available at:

    GitHub - CpanelInc/xmlapi-php: A PHP Class for Interacting with cPanel's XML-API

    Thank you.
     
Loading...

Share This Page