Skip to main content

Building new cpanel account via API

Comments

8 comments

  • anton_latvia
    You can't reverse mysql passwords. If you want to create new accounts on WHM server, all you need is Remote Access Key of the server. I suggest that you look through API - somewhere there were links to ready-php classes, that are great help with various functions, not just account creation. With RemoteAccessKey you basically can do a lot of things, as you access your server as root.
    0
  • leonep
    thanks for reply registration.php on my website --> users choose their own password --> verify if choosed password strenght is good for my cpanel setting (required strenght 60)--> store password and user details on my db --> purchase a service --> creation account in cpanel i have problem in the last phase i want to create account with password choosed by customers ! well i can register accounts in cpanel after registration.php because i have password in session but i don't want this i want only after purchase. thank you
    0
  • anton_latvia
    I am using this API to make function call more simple: cPanel::PublicAPI - search.cpan.org Take a look there, there are some examples, including account creation. Let me know, if you can't make it work.
    0
  • leonep
    thanks anton but i think i undestand how to use apis my problem is that i want use whm1 api createacct but i have only hash passwords and the api require password plain_text i want use (WHM API 1 Functions - createacct - Software Development Kit - cPanel Documentation) thanks
    0
  • anton_latvia
    in order to create account you need to have either root or reseller password or server remote-access key. May be I don't understand, what you are trying to do.. when you create account - you can set any password you want, but i guess it can not be encrypted, since account creation script will encrypt it..
    0
  • leonep
    I got a registration page on my website where users choose their own passwords. For security reasons i store in my database the hash of these passwords. After the purchase of services i want to create accounts using api but i have only the hash... may be i can random generate password but i must send to customers and is not good to send passwords throught email .I also like to have same password for my customers accounts on website and cpanel customers accounts sorry if i was not clear ! thank you very much for your patience
    0
  • anton_latvia
    well, that's what I thought, in fact.. ;) well, either you store plain-text password for limited period of time (say 1 hour, so customer can complete registration) or encrypt it with some de-cryptable algorithm. May be option is to store plain text-pw in a separate field or separate database, also for short period of time. I personally don't see other way, sorry.
    0
  • cPanelMichael
    Hello :) Note that what you are seeking might be better handled by a third-party billing application such as WHMCS: WHMCS | The Complete Client Management, Billing & Support Solution Thank you.
    0

Please sign in to leave a comment.