function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EttysEttys 

Error trying to login to a sandbox instance

Hi,

My team is developing some customizations using the SFDC API.
We got an error, trying to connect to SFDC sandbox instance:

faultCode: {urn:fault.enterprise.soap.sforce.com}INVALID_LOGIN

faultSubcode:

faultString: INVALID_LOGIN: Invalid username or password or locked out.

faultActor:

faultNode:

faultDetail:

{urn:fault.enterprise.soap.sforce.com}fault:

INVALID_LOGIN

Invalid username or password or locked out.


It looks pretty straight forward. We thought it had to do with a missing token, but after resolving the token issue - we could login through the web, but not via the code. The token was appended to the pwd in the code too.

Any idea is welcomed.

Thanks,
Etty
Best Answer chosen by Admin (Salesforce Developers) 
Blake17Blake17
I was able to log into our company sandbox by appending ".<sandbox>" to the end of my test account user id and using my password without the security token. When I tried to append the security token to the end of my password, it would not work. So if your user login is "xyz@company.com" and your sandbox is "sandbox", then your login needs to be xyz@company.com.sandbox. You may have to try your password with and without the security token. On my developer account, I had to use the security token, and I'm not sure at this point why there is a difference since I'm coming in from the same location. The only other piece is making sure your WSDL has the correct URL, https://test.salesforce.com/services/Soap/c/12.0, which it appears you are using. Hope this is of assistance.

Blake

All Answers

Rick.BanisterRick.Banister
What URL are you using to connect?
vkernelvkernel
I have same problem. I've tried https://test.salesforce.com/services/Soap/u/12.0 to connect.
Should I reset security token for sandbox or I can use token from parent account?
Blake17Blake17
I was able to log into our company sandbox by appending ".<sandbox>" to the end of my test account user id and using my password without the security token. When I tried to append the security token to the end of my password, it would not work. So if your user login is "xyz@company.com" and your sandbox is "sandbox", then your login needs to be xyz@company.com.sandbox. You may have to try your password with and without the security token. On my developer account, I had to use the security token, and I'm not sure at this point why there is a difference since I'm coming in from the same location. The only other piece is making sure your WSDL has the correct URL, https://test.salesforce.com/services/Soap/c/12.0, which it appears you are using. Hope this is of assistance.

Blake
This was selected as the best answer
vkernelvkernel
:) Thank you! It's working