Jump to content

Validate Login - Local API question


rush_dar

Recommended Posts

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated