API:Encrypt Password

Jump to: navigation, search

Purpose

This command is used to encrypt a string using the WHMCS encryption algorithm.

Attributes

  • password2 - should contain the string you want encrypting

Example Command

External API

 $postfields["action"] = "encryptpassword";
 $postfields["password2"] = "xxxxxx";

Internal API

 $command = "encryptpassword";
 $adminuser = "admin";
 $values["password2"] = "xxxxxx";
 
 $results = localAPI($command,$values,$adminuser);

Successful Response

 result = success
 password = xxxxxx - contains the encrypted string