Hello,
I am having an issue with the local ValidateLogin API call, using the example in the API docs "https://developers.whmcs.com/api-reference/validatelogin/", it works for my login, but anyone else, it fails. I have validated logins with actual test accounts that do work when using the normal login method.
This snippet of code is running locally on the same server that my WHMCS install is located. It takes the email and password of an individual and validates with the API, if success, do a support check, otherwise, explain the error to the user. In a nutshell, that is what this section of code does. Any ideas of why this acts this way and not allow an user to log in?
$command = 'ValidateLogin';
$postData = array(
'email' => (string)$email,
'password2' => (string)$pass,
);
$adminUsername = '';
$login_results = localAPI($command, $postData, $adminUsername);
if ($login_results['result'] == 'success') {}
Thanks
Keith