You need to sign in to do that
Don't have an account?
Dan Cahill
Error trying to log into sandbox using PHP API call - INVALID_LOGIN: Invalid username, password, security token; or user locked out.
I've seen other posts regarding this issue and have tried them to the best of my ability, but no luck.
PHP code:
Every attempt always shows:
Fatal error: Uncaught SoapFault exception: [sf:INVALID_LOGIN] INVALID_LOGIN: Invalid username, password, security token; or user locked out.
So far I have tried the following:
PHP code:
$USERNAME="XXX"; $PASSWORD="XXX"; $TOKEN="XXX"; require_once ('../forcecom/soapclient/SforcePartnerClient.php'); require_once ('../forcecom/soapclient/SforceHeaderOptions.php'); $mySforceConnection = new SforcePartnerClient(); $mySoapClient = $mySforceConnection->createConnection("../forcecom/soapclient/partner.wsdl.xml"); $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD . $TOKEN);
Every attempt always shows:
Fatal error: Uncaught SoapFault exception: [sf:INVALID_LOGIN] INVALID_LOGIN: Invalid username, password, security token; or user locked out.
So far I have tried the following:
- Recreating the sandbox.
- Resetting the password and the security token for two seperate accounts. Both of these account can log into the sandbox using the browser successfully.
- Changing the endpoint to <soap:address location="https://login.salesforce.com/services/Soap/u/32.0"/>
<urn:LoginScopeHeader>
<urn:organizationId>?</urn:organizationId>
<!--Optional:-->
<urn:portalId>?</urn:portalId>
</urn:LoginScopeHeader>
OR you can first go and check the profile for the user you try to login and check if API Enabled is checked.