When a customer updates their email address in my billing system, I want to make a remote call to WHM/cPanel and update their contact email address. As far as I can see, the only way to do that is to make a call to the api2 function CustInfo::savecontactinfo.
However, I don't know the user's password, so I have to connect as a reseller or as root. If I try to make a call to an api2 function remotely, it will only work if I use basic authentication. For that I have to store my root password in my script's database, which I don't want to do. I can use WHM authorization ok to access WHM function calls such as xml-api/createacct (using user root and the remote access key), but not to access xml-api/cpanel functions (using the account username and the owner's remote access key).
Is there any way I can call an api2 function remotely using the client's account username and my reseller or root remote access key instead of a password?
However, I don't know the user's password, so I have to connect as a reseller or as root. If I try to make a call to an api2 function remotely, it will only work if I use basic authentication. For that I have to store my root password in my script's database, which I don't want to do. I can use WHM authorization ok to access WHM function calls such as xml-api/createacct (using user root and the remote access key), but not to access xml-api/cpanel functions (using the account username and the owner's remote access key).
Is there any way I can call an api2 function remotely using the client's account username and my reseller or root remote access key instead of a password?
Last edited: