Automatically Creating cPanle User Using API

c0mgu1

Registered
Nov 9, 2010
1
0
51
Hello,

I am using XML APIs for creating cPanel User in WHM (createacct)

(1) I want to create a new user account with out passing username and WHM is able to generate a username based on the passed domain name
(2) And based on Domain Name I want to get the username which is automatically created by WHM

Can any one help me on how to do that I am using 11.26 WHM

Regards
c0mgu1
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
Houston, TX
cPanel Access Level
Root Administrator
Hi c0mgu1,

The XML-API function createacct will not perform the action you desire. You must pass a username when making your request. The parsing that you describe on WHM's Create Account page is provide by Javascript served from WHM.

Your script will need to parse a valid username from the domain before making the XML-API call.

Regards,
-DavidN