<div dir="ltr">Hello,<div><br></div><div><a href="https://code.vtiger.com/vtiger/vtigercrm/issues/1164" target="_blank">https://code.vtiger.com/vtiger/vtigercrm/issues/1164</a></div><div><br clear="all"><div><div dir="ltr" class="m_-5451189728937347251gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">INVALID_USER_CREDENTIALS error return from while using webservice</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">This error is triggering from include/Webservices/Login.php line 28</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">This error happens when multiple users using the webservice simultaneously</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">this error happens in this scenario. suppose we have a script get_tickets.php to list all tickets.</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">We authenticate with username and accesskey of admin in this script.</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">user1 comes and run the get_ticket.php . Obviously the script will be first doing the webservice login .</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">The script calls the getchallenge method and an auth tocken is generated on the databases.</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">before the script call the login method for user1 , user2 runs the get_tickets.php script and calls the get challenge method.</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">Now the authtocken get modified on the database. Hence the the auth tocken is not valid for user1 and he cannot login and this exception will returned</p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">The issue is because of regenerating auth tocken on each login request. </p><p style="box-sizing:border-box;margin:0px 0px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px">I am able to fix the issue by making the auth tocken static. It does not regenerate on each request</p>Regards,<br>Lajeesh<br></div><div>Freelance developer / entrepreneur</div><div><br></div></div></div></div></div></div>