Yeah, I had tried that, but I got an Invalid login error? I can login to the the PROD environment no problem. I wouldn't think it has anything to do with the security token since I can login to PROD with the same username and password?
I figured the issue was an incorrect endpoint and server URL.
Look up the user id you're trying to use with the Apex Explorer
Look in the Logon History section to see if there's anything of value there If you don't see any failed logons => you're using the wrong username If you do see failed logons => the error message here often gives you a better explanation of what's going wrong
Another thing to check is if your current IP is listed in the trusted networks...meaning that you don't need the token. I agree with checking the login history as well to see what kind of failures you are receiving.
I usually have my sandbox endpoint listed as: https://tapp0.salesforce.com/services/Soap/u/11.1
My Premier Support rep told me the other day that he thought Sandboxes are not subject to the whole concept of security tokens, meaning you should be able to access them using only username and password regardless of location. Of course, he could be wrong, but I've actually never had to put in a security token while logging in to Sandbox via the API...
I believe the "official" endpoint is https://test.salesforce.com/services/Soap/u/11.1, but if you're sure you're on the tapp0 instance you should be fine using that one. I don't want to keep changing whenever I change sandbox, so I always use test.
In the same way, you can use https://na1.salesforce.com/services/Soap/u/11.1 for your production org if you're on the na1 instance, but you might as well use https://www.salesforce.com/services/Soap/u/11.1, for the same reason as above.
I know from experience that sandboxes do use the tokens. Before adding my home IP to my company's trusted network list (in the sandbox), I had to constantly update the token in the Apex Explorer and various .NET integration apps I was working on our of the office. A hassle and short sighted security protocol for sure.
Seems to me this problem is either a bad endpoint, incorrect user name, or locked out account. When you connect to an org via the Explorer you are thrown an error message telling you that the failure was probably due to the lack of a token.
Good catch! Yes, your username is different in your sandbox. The default username is your production username suffixed with a dot and then the name of your sandbox. So, Prod username being "foo@bar.com" and sandbox name being "howdy", your sandbox username would be "foo@bar.com.howdy". Of course, this could be changed once the sandbox is created.
I tried everything that was suggested in this thread to no avail. I can log in fine to the production (www) endpoint using my user id and password with security token. I cannot log in to my sandbox endpoint (test) using the sandbox user id (uid.sandbboxname) and the same password and security token. The log says "invalid password".
Hi Johan,
Thanks for replyig to my post.
Yeah, I had tried that, but I got an Invalid login error? I can login to the the PROD environment no problem. I wouldn't think it has anything to do with the security token since I can login to PROD with the same username and password?
I figured the issue was an incorrect endpoint and server URL.
Any other ideas?
Thanks again.
Regards.
If you don't see any failed logons => you're using the wrong username
If you do see failed logons => the error message here often gives you a better explanation of what's going wrong
Hope that helps.
I usually have my sandbox endpoint listed as: https://tapp0.salesforce.com/services/Soap/u/11.1
I believe the "official" endpoint is https://test.salesforce.com/services/Soap/u/11.1, but if you're sure you're on the tapp0 instance you should be fine using that one.
I don't want to keep changing whenever I change sandbox, so I always use test.
In the same way, you can use https://na1.salesforce.com/services/Soap/u/11.1 for your production org if you're on the na1 instance, but you might as well use https://www.salesforce.com/services/Soap/u/11.1, for the same reason as above.
Regards
//Johan
Seems to me this problem is either a bad endpoint, incorrect user name, or locked out account. When you connect to an org via the Explorer you are thrown an error message telling you that the failure was probably due to the lack of a token.
Bryan
The default username is your production username suffixed with a dot and then the name of your sandbox.
So, Prod username being "foo@bar.com" and sandbox name being "howdy", your sandbox username would be "foo@bar.com.howdy".
Of course, this could be changed once the sandbox is created.
I will make sure I'll educate my support rep next time I speak to him. ;)
In case anyone hasn't noticed, APEX explorer won't work with API 17 or 18 either. It gives errors after submitting your login; at least it did for me.
thanks this helped me ..
I tried everything that was suggested in this thread to no avail. I can log in fine to the production (www) endpoint using my user id and password with security token. I cannot log in to my sandbox endpoint (test) using the sandbox user id (uid.sandbboxname) and the same password and security token. The log says "invalid password".