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
Leo DarkstarLeo Darkstar 

Connected App login settings for a sandbox

I am having problems properly setting up a Connected App for a sandbox. I've got the Connected App working in Production. With that configuration I have the API Host listed as such in the login configuration :

 

MYDOMAIN.my.salesforce.com/services/Soap/c/24.0/ORGID


And that's working - even though my API is 49.0 (not 24.0) in that URL.


But I can't get the external login to work for a sandbox. I'm not sure what the API Host should be in the login configuration for a sandbox.


I've tried this :

MYDOMAIN--NAMEOFSANDBOX.LOCATION.my.salesforce.com/SANDBOXORGID
 

But is there another URL that should be used for a sandbox ? Should it have 'test' in the URL or something else ? Should the MYDOMAIN not even be in it ? Does SOAP need to be in it ? Do I need the sandbox ORG ID at the end ?


Thank you for any help you can give on this.

AnudeepAnudeep (Salesforce Developers) 

Hi Leo, 

I was looking at this Trailhead Module and noticed the URL you used in your production org which is working fine looks similar to what is described in the module

https://login.salesforce.com/services/Soap/c/36.0/0DF36000000PFqW

I suggest trying using test.salesforce.com or your mydomain (https://mydomainname.lightning.force.com) for your sandbox. You can also install SOAP UI and make a login call to your sandbox with the URL similar to what is described in the trailhead module, if it succeeds, you can use it in your login configuration

Your URL format is correct

If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!

Anudeep