l0sth34d Posted July 10, 2012 Share Posted July 10, 2012 Hello, I'm using the internal API, I added the IP of the server in the security section and created an admin with the API Access for the Role and I'm still getting the "result=error;message=Authentication Failed;" message when I call the API. I tried a simple validate login command, the result is "result=error;message=Authentication Failed;OK". So basicly everything is working except that it keeps saying this Authentication Failed without any reason... Is this a bug or am I missing something here ? Heres the code.. <?php require("../includes/api.php"); # Set Vars $command = 'validatelogin'; $values = array( 'email' => 'email_of@the_client.com', 'password2' => 'his_password', ); $adminuser = 'API_USERNAME'; # Call API $results = localAPI($command,$values,$adminuser); if ($results['result']!="success") { echo "An Error Occurred: ".$results['result']; } else { echo "OK"; } ?> 0 Quote Link to comment Share on other sites More sharing options...
Nathanael Posted July 12, 2012 Share Posted July 12, 2012 If you are in a shared hosting with multiple ips verify that the allowed ip in your api is the web server ip. 0 Quote Link to comment Share on other sites More sharing options...
l0sth34d Posted July 13, 2012 Author Share Posted July 13, 2012 (edited) Thank you very much for your reply gnugeek, I found out what was the problem, I was calling the api.php and I found out that it's not the way to do it. We need to call some files like when we create a custom page (can't remember the file names and cannot verify since I'm writing this with my cellphone). However if anyone have the same problem I will be glad to help. Edited July 13, 2012 by l0sth34d 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.