× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Login validation with Android App
Hi guys,

I'm new to userspice and have been building an IOT platform using the system. Its coming together well. I now need to allow login from an android app to the platform.

At the moment, I'm just trying to send a validation message that the user and password are correct. I've tried using POST to send the data to the login form but I am not getting any response. When I try it in Postman, I get an error page with the message:

"There was an error with your form. Please go back and try again. Please note that submitting the form by refreshing the page will cause an error."

Am I going about this the wrong way?
I solved the problem. I just learned how the login.php file worked and made a second login file just for the smartphone app.


// This is a user-facing page
//This page has been written to allow the app to login to the website

ini_set("allow_url_fopen", 1);
require_once '../users/init.php';

$validate = new Validate();
$user = new User();
$login = $user->loginEmail($uname, trim($pword), $remember);

if ($login) {
    echo "Valid username and password provided. ";
    // Do actions for smartphone app


else {
        echo "Validation failure.";

Is everything working properly? If you need help making that api, let me know. Sorry I wasn't on the forums yesterday.

Forum Jump:

Users browsing this thread: 1 Guest(s)