+ Start a Discussion

How to get supported version numbers without specifying one first?

I'm coding my integration to get records out from SFDC. I need to show supported version number list before accessing SFDC data.
But I find that:
1. When trying to get versions information from https://login.salesforce.com/services/data , I have to login first to get a session ID.
2. When trying to login SFDC, I have to specify a version number in the URL first like https://login.salesforce.com/services/Soap/u/29.0 .
It seems to be a loop. If I'm not sure which version I could use, I should try several times manually.
Is there any way to login without specifying version number?

As far as I know, when using URL https://login.salesforce.com/services/Soap/u without version number, '/u' would be considered as an invalid version. When using https://login.salesforce.com/services/Soap, '/u' or '/c' is required to be specified.
Any suggestions?

Andy BoettcherAndy Boettcher
You can log in via login.salesforce.com without specifying an API version, but you need to set that version number in all subsequent calls.
Hi Andy,

When I send a web request to login with URL, username and password, the URL should be like this, https://login.salesforce.com/services/Soap/u/29.0 . There is a specified API version number.
I tried some URLs as following:
    1. https://login.salesforce.com/
    2. https://login.salesforce.com/services/Soap
    3. https://login.salesforce.com/services/Soap/u
All the three are invalid. The response messages are:
    1. HTML text for a login page of Salesforce.
    2. /u or /c should be specified.
    3. /u is an invalid version.

So, how could I change the URL text?

Daniel BallingerDaniel Ballinger
I don't believe you can omit the API version when making API calls to the Partner API. Salesforce needs to know which API version you are using, even with the login call.

It must take the form:
You can safely assume that all orgs will support the current v35.0 of the API going forward. That is the primary reason Salesforce includes the API version in the URL, so they can provide long term support for older releases.