You need to sign in to do that
Don't have an account?
JLeisse
If logging in via the API, do I need to hard code options for Production and Sandbox separately?
I have an API set up currently to login to Salesforce using 'https://login.salesforce.com/services/Soap/u/34.0'. If I want to have an option to login to a Sandbox, do I need to hard code that URL to 'https://test.salesforce.com/services/Soap/u/34.0'? Or is there another option so I don't have to hard code two different URLs?
No, you can't log in via a single URL that is smart enough to point to either system. Instead, you'll need to configure the endpoint. You don't have to hard code it per se, but it should be configurable through either a custom setting or a property depending on how you're calling into Salesforce.
All Answers
No, you can't log in via a single URL that is smart enough to point to either system. Instead, you'll need to configure the endpoint. You don't have to hard code it per se, but it should be configurable through either a custom setting or a property depending on how you're calling into Salesforce.