Email APIs - require root access?
I'm looking into making my own system like the one at signup.mail.com (for my own domains), and would love to automate the process like it is there.
Do those APIs require root access? Would love to start cheaply with a shared web hosting package, but thought I would check on that.
Also, is there an API to test if a given email address is already taken (for a given domain)?
-
I understand that I should be using UAPI UserManager::create_user/ - the URL says it's to create a sub-account, but does that mean an email account, or does it do both? I just want an email account.
https://api.docs.cpanel.net/openapi/cpanel/operation/UserManager::create_user/
I see a URL on creating forwarders (which I may want) here:
https://api.docs.cpanel.net/openapi/cpanel/operation/add_forwarder/
But so far nothing on checking the existence of an email address/account.
0 -
Hey there! The API itself would not require root access. However, the root user of the server will have to setup your authentication token with limited permissions, so you may find that isn't something a shared hosting provider will want to do.
To create the email account you'd want this call:
https://api.docs.cpanel.net/openapi/cpanel/operation/add_pop/
The following call will let you list email addresses already created:
https://api.docs.cpanel.net/openapi/cpanel/operation/list_pops/
0 -
Perfect - thanks!
0 -
You're very welcome!
0
Please sign in to leave a comment.
Comments
4 comments