You need to sign in to do that
Don't have an account?
jason_lowry
Can't login to sandbox via API after refresh
Hello,
I'm stuck and hoping someone can help. I refreshed my sandbox and I can login via the web but cannot log in via the API. I use Eclipse for Force development and can't reconnect. I also tried via the PHP soapclient - which is what we use internally - and get the same error. Following the refresh I logged in and reset my security token. I've tried this three times but it continues to fail. Like I said, I can log in normally but not through the API so it suggests a problem with the security token or API. I am using a default System Administrator profile that has API Enabled checked by default.
<?php
require_once ('soapclient/SforceEnterpriseClient.php');
define("USERNAME", "jason@finch.com.dev");
define("PASSWORD", "XXXXXXXX");
define("SECURITY_TOKEN", "XXXXXXXXXXXXXXXXXXXXX");
$mySforceConnection = new SforceEnterpriseClient();
$wsdl = 'soapclient/enterprise.wsdl.xml';
$mySforceConnection->createConnection($wsdl);
$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);
$query = "select email from user";
$result = $mySforceConnection->query($query);
print_r($result);
?>
This works on production but fails in the sandbox with the following error:
Fatal error: Uncaught SoapFault exception: [INVALID_LOGIN] INVALID_LOGIN: Invalid username, password, security token; or user locked out. in /Applications/XAMPP/xamppfiles/htdocs/trunk/plugins/system/salesforce/soapclient/SforceBaseClient.php:168
Any other suggestions?
I'm stuck and hoping someone can help. I refreshed my sandbox and I can login via the web but cannot log in via the API. I use Eclipse for Force development and can't reconnect. I also tried via the PHP soapclient - which is what we use internally - and get the same error. Following the refresh I logged in and reset my security token. I've tried this three times but it continues to fail. Like I said, I can log in normally but not through the API so it suggests a problem with the security token or API. I am using a default System Administrator profile that has API Enabled checked by default.
<?php
require_once ('soapclient/SforceEnterpriseClient.php');
define("USERNAME", "jason@finch.com.dev");
define("PASSWORD", "XXXXXXXX");
define("SECURITY_TOKEN", "XXXXXXXXXXXXXXXXXXXXX");
$mySforceConnection = new SforceEnterpriseClient();
$wsdl = 'soapclient/enterprise.wsdl.xml';
$mySforceConnection->createConnection($wsdl);
$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);
$query = "select email from user";
$result = $mySforceConnection->query($query);
print_r($result);
?>
This works on production but fails in the sandbox with the following error:
Fatal error: Uncaught SoapFault exception: [INVALID_LOGIN] INVALID_LOGIN: Invalid username, password, security token; or user locked out. in /Applications/XAMPP/xamppfiles/htdocs/trunk/plugins/system/salesforce/soapclient/SforceBaseClient.php:168
Any other suggestions?
If a login call is made from the API for a user with an expired or temporary password, subsequent API calls to custom Apex SOAP Web service methods aren't supported and result in the INVALID_OPERATION_WITH_EXPIRED_PASSWORD error. Reset the user's password and make a call with an unexpired password to be able to call Apex Web service methods.
Any other suggestions?
Are you sure that the Sandbox name is not changed ? By any chance did you change your User name ?
1. If the User name is correct, try adding your IP address to the Trusted Sites. Thus Security Code is not mandatory
If this does not work, refreshing the sandbox one more time seems the choice. Probably create this time with a different name.
1 - login into sandbox via web and check the personnel information [some times 'user Locked' button apper, if yes click 'UnLock']
2- set the Login IP ranges for system admin profile (profiles->system admin profile->login ip ranges ->
start ip - 0.0.0.0 end ip - 255.255.255.255)
3 - login via data loader without security token hence we added ip address and we can able to login!!
This thread also said that I had to update my WSDL endpoint, which makes sense - but still didn't work for me.
https://developer.salesforce.com/forums/ForumsMain?id=906F00000008pAhIAI
Thanks for your help.
Sandbox url is Test.Salesforce.com where as Production is Login.Salesforce.com. Only possibility is that you are using the Sandbox Credentials to login Production URL (Login.Salesforce.com). Can you make sure if you are using the sandbox url only ?
In the place of Sandbox credentials, try using the Production credentials. If it logs you in, then the url is Produciton for sure.
-
Change your username
-
Specify your domain in the login URL (cs3.salesforce.com)
It's almost like the login via test.salesforce.com has cached the old sandbox user, so any attempt via test instead of the specific cs hits the old one. This really needs to be fixed, because some tools don't let you specifiy your own URL (like real force explorer - which is awesome by the way). Your solution is much the same by specifying a different sandbox name, thus creating a different username.Updating my ant build.properties file to the actual subdomain helped, so instead of using test.salesforce.com as serverurl I used cs8.salesforce.com
Please fix this soon!