Accessing a Salesforce sandbox through API
can someone with salesforce API integration help me understand the requirements to access a client's Sandbox? I need to access the sandbox and pull data into our MySQL server.
I hired a programmer but he seems to be having a hard time accessing the sandbox and I want to try to help by guiding him in the right direction? Client provided us with the following credentials for the sandbox.
Your help will be greatly appreciated...
Are you sure you're using the *sandbox* login? That's usually the culprit here. It should be `https://test.salesforce.com/`.
I guess that's a compliment? No, I'm sfdcfox. You know, the same guy over here: http://boards.developerforce.com/t5/user/viewprofilepage/user-id/18918
That would mean... the same guy that's been threatening to write a blog for 9 months, and haven't got to it yet, lol.
lol. I just realized. You're fast at answering questions. But I'm faster (sometimes). Thanks, I'll take that to mean I'm doing my unofficial job in life, to help people along ;-)
In addition to sfdcfox pointing out that you generally login to a sandbox at https://test.salesforce.com, there is another option. Since you are using my domain you can login through its URL:
https://mydomain--sandboxName.[Instance].my.salesforce.com. Note that the instance can change when the sandbox is refreshed.
Does the client have it configured so you must login through their custom domain? If not, use https://test.salesforce.com.
Thanks so much for this, it helped me a lot. I would have thought the WSDL generated from a site would have handled the case where a custom domain is needed but then I'm a bone head. And for bone heads like me I'll point out that you'll need to edit the WSDL's service address for the custom domain.
For access via the API or a client, the user must add their security token to the end of their password in order to log in. A security token is an automatically-generated key from Salesforce. For example, if a user’s password is mypassword, and their security token is XXXXXXXXXX, then the user must enter mypasswordXXXXXXXXXX to log in.
Here is how I was able to log in to sandbox (C# app)
<endpoint address="https://test.salesforce.com/services/Soap/c/32.0/<org id goes here>" binding="basicHttpBinding" bindingConfiguration="SoapBinding1" contract="sforce.Soap" name="SoapTest" />
Make sure that username is appended with ".[sanboxname]".
Users can log in to the sandbox at https://test.salesforce.com by appending .sandbox_name to their Salesforce usernames. For example, if a username for a production organization is [email protected], and the sandbox is named “test”, the modified username to log in to the sandbox is [email protected]
The password needs to have security token appended. If password = test and token = 123, then you need test123
For anyone who is hitting this issue, also be sure to check that you have taken the url from Classic and not Lightning. Below is the difference