Automating Account Creation Question

professordave

Registered
Jul 8, 2017
1
0
0
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!
 
Last edited by a moderator:

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
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..
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
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:

Developer Documentation Home - Developer Documentation - 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.
 
May 14, 2018
12
0
1
India
cPanel Access Level
Reseller Owner
Hi,

We are looking for a solution where our client can have a BUTTON in (WHMCS) Client Area -> Products & Services Section -> When he clicks on the button that will take him to his cPanel without prompting for username and password (API token. cPanel username , password and IP for us to use) (This cPanel account is hosted with another provider, but the client has quite a few domains and hosting + Addons from our end. He wants us to link this cPanel account too with OUR WHMCS so that he can just click and login directly without remembering his username and password)

In this case scenario we don't have access to cPanel account within our WHM.