The Manage2 API supports HTTP or key-based authentication.
Manage2's client libraries use basic authentication over SSL by default. This method encodes the Manage2 username and password inside the HTTP request headers.
Basic Authentication encodes the Manage2 username and password inside the HTTP request headers.
When you call a Manage2 API script in a web browser, a dialog box will appear below the URL.
Enter the Manage2 username and password in the appropriate text boxes.
curl -u command to authenticate user accounts when you call the function via the command line:
cPanelLicensing Perl module to authenticate to the user account:
require PHP class to authenticate to the user account:
Key-based authentication grants access to a limited subset of the account's abilities without the account's username and password.
For security, the system limits keys to one IP address. You must register keys on the computer that runs the scripts.
To register a key, perform the following steps:
On subsequent API calls, pass this key as the
apikey parameter's value:
If you use key-based authentication, the Manage2 API provides a Cross-Origin Resource Sharing (CORS) header. For more information, read W3's Cross-Origin Resource Sharing documentation.