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

questions about URL returned from login() call

Using the 2.5 API, the login() call returns the URL: Through the UI, the {API_Partner_Server_URL} merge fields returns the URL:

These are close, but not exactly the same. I'd like to know if these URLs can be used interchangeably, and if not, what are the different circumstances when I would use one or the other?


Using the 2.0 API, the login() call returns the URL: I need this URL for use in an Scontrol, but I don't see any merge field that will provide this, and I am very reluctant to hard-code this. Even though this is a 2.0 API issue, I'd like to see this oversight rectified. What can I do about this?



Hi Nick,

You can use the two variants of the url interchangeably.  They will both resolve to the correct app server farm.  The api.salesforce... variant is a carry over from the XML-RPC days.  

The 2.0 endpoint can be constructructed from the {API_Partner_Server_URL} merge field by using the portion and appending the /servlet/servlet.SoapApi string to the end of it.