Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
The NameCheap API allows you to build web and desktop applications that integrate with your NameCheap account. It allows you to programmatically perform operations like domain search, domain register, purchase SSL etc., from within your application.
Place the appropriate version of the Namecheap SDK in the libraries directory within the site you are working. That may be 'default' or 'all' like the following: sites/all/libraries or sites/default/libraries. The end result after extracting the library should be sites/.../libraries/namecheap/registrars/namecheap/namecheap.php.
Configuration can be performed either using variables hardcoded into settings.php or the UI. If you want to hardcode them then look at the UI for the variable names.
$conf['namecheap_username'] = '...';
$conf['namecheap_password'] = '...'; // API key, but SDK did not rename it.
$conf['namecheap_testmod'] = '...';
The following is an example of how to use the API inside of Drupal.