mattmc Posted January 5, 2011 Share Posted January 5, 2011 I'm trying to build a custom validatelogin url to validate a user. I've taken the curl example from the 'API Example' on the documentation page changed the "action" postfield to contain "validatelogin" along with other required settings. The only response I can get is "Authentication Failed". I've tried all forms of usernames/email addresses and I've even tried encrypting the password (md5) and still nothing. Does anybody have any insight? $url = http://www.mydomain.com/whmcs/includes/api.php; $postfields["action"] = "validatelogin"; $postfields["email"] = "testusername"; $postfields["password2"] = "testpassword"; $results["result"] == error and the message is "Authentication Failed" yes...I've created a valid account as well 0 Quote Link to comment Share on other sites More sharing options...
mattmc Posted January 5, 2011 Author Share Posted January 5, 2011 Sorry, I forgot to include the admin username and md5(admin password) in the postfields It should be like this $postfields["action"] = "validatelogin"; $postfields["username"] = "admin_username"; $postfields["password"] = md5("admin_password"); $postfields["email"] = "email_address_of_user_to_authenticate"; $postifleds["password2"] = "password_the_user_supplied"; 0 Quote Link to comment Share on other sites More sharing options...
arctic-ice-cool Posted February 5, 2011 Share Posted February 5, 2011 Did you ever get this fully working? I'm currently experiencing that connecting via curl is making the validation return the incorrect password hash, due to the fact it's using the servers IP address, not the clients IP address? Is there any other ways of connecting to the API that you know of? Thanks 0 Quote Link to comment Share on other sites More sharing options...
Akin Posted January 25, 2023 Share Posted January 25, 2023 Go to your WHMCS/admin and navigate to api to create the identifier and secrete that is what whmcs will use to authenticate your domain with user 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.