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
Wei GuanWei Guan 

invalidUrl error while working on Import Accounts Using Bulk API and Workbench

I followed the instruction and invoked:
/services/async/v37.0/job
With correct header and request body. 
Got this error
exceptionCode: InvalidUrl
exceptionMessage: unknown version: v37.0

How to resolve this?
Anupama SamantroyAnupama Samantroy
Try with a lower version api. lets say v36.0
Kalapati SwapnaKalapati Swapna
please check session id in soap api version same  as the version you are using to invoke the api
Carlos FrancoCarlos Franco

Hi, I am having the same problem here...

I did the login in SOAP

<metadataServerUrl>https://na3.salesforce.com/services/Soap/m/38.0/00D50000000a1Sd</metadataServerUrl>
<serverUrl>https://na3.salesforce.com/services/Soap/c/38.0/00D50000000a1Sd/0DF50000000GvUU</serverUrl>
<sessionId>00D50000000a1Sd!AQkAQNFkXV_19W3wiLc1WgQ.IY5LudV5Ywf2oN6uza2puD7bjY4UAUJH1F3UEoaOCKLWxa5Uj.TijZXArg_flEQZ_DvM2pZL</sessionId>

And when I try to run the job in workbench

Content-Type: application/json; charset=UTF-8
Accept: application/json
X-SFDC-Session: 00D50000000a1Sd!AQkAQNFkXV_19W3wiLc1WgQ.IY5LudV5Ywf2oN6uza2puD7bjY4UAUJH1F3UEoaOCKLWxa5Uj.TijZXArg_flEQZ_DvM2pZL

 

I got the error

 

 

exceptionCode: InvalidUrl
exceptionMessage: unknown version: v38.0

 

 

Carlos FrancoCarlos Franco

I also tried to login with version 37 (https://login.salesforce.com/services/Soap/c/37.0/0DF50000000GvUU) but got the same error...

Thanks in advance

 

Carlos

Kalapati SwapnaKalapati Swapna
Hi, 
/services/async/v37.0/job
Can you remove 'v' from version and try again.
And if you gave any Namespace Prefix  can you add that Namespace Prefix to that url and try it.
ex:https://login.salesforce.com/services/Soap/c/38.0/Namespace Prefix/id
Carlos FrancoCarlos Franco

OMG Swapna jp,  I updated the orginal /services/data/v37.0 and left  V ... so embarrassing :/

Now it is working

Thanks a lot :)

 

RV NAGARAZ RAVRV NAGARAZ RAV
/services/async/37.0/job/XXXXX/batch

Working Fine.

Thanks Swapna


 
Chetan KapaniaChetan Kapania
User-added image
I am getting this error message while trying to create a bulk Job. Any guidance on it, as where I am going wrong. I have used the session Id generated through  Soap UI login request. 
Kalapati SwapnaKalapati Swapna
Hi Chetan Kapania,

     Did you provide  Session id in  Request Headers?
    if no please provide your session id  which is generated in SoapUI.
Thanks
Swapna Jp.
 
Chetan KapaniaChetan Kapania
Hi Kalapati Swapna,

I provided the session id generated in Soap UI underr Request Headers but still unable to complete this activity.
Indeed I am unable to complete another activity related to Creation of accounts through Soap UI because of Session Id issue. I followed the steps as mentioned under Trailhead module within Soap UI application.
I have able to create request for login but when I tried to create request for creating acccount, it gave me Session Id issue. 

Regards
Chetan Kapania.
Kalapati SwapnaKalapati Swapna
Can you provide same version 39.0 in soap UI and generate session Id
Chetan KapaniaChetan Kapania
I have already generated Session Id more than once using latest API version 39.0 by putting DE login password with security token. Upon pressing green button, it generates Session Id which is not recognised by the system.

Upon putting the request for create, this is the error message I am getting:
User-added image  
Kalapati SwapnaKalapati Swapna
Hi  Chetan ,
 please modify your soap UI login request  which is given below  and execute  you didnt mention your server url so thats why its giving unknown exception . try this 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
   <soapenv:Header>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>your salesforce account</urn:username>
         <urn:password>yourpassword session id</urn:password>//no space b/n pwd and session id
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>







 
Kalapati SwapnaKalapati Swapna
[image: Inline image 1]
Chetan KapaniaChetan Kapania
Hi Kalapati Swapna
,
Thanks for the response. As mentioned, I modify soap UI login request above but recieved this message
User-added image

The changes I made to login request is as follows:
User-added image

 
Kalapati SwapnaKalapati Swapna
Hi Chetan,
please provide like this you will get correct response.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
   <soapenv:Header>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>your salesforce account</urn:username>
         <urn:password>yourpassword security token</urn:password>//no space b/n pwd and security token
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

User-added image

Thanks,
Swapna.
Chetan KapaniaChetan Kapania
Hi Swapna,

Sorry to say but still unable to find success, as getting same error message as earlier while trying to execute a Bulk API job which says Invalid Session Id.

Regards
Chetan
Kalapati SwapnaKalapati Swapna
Hi Chetan ,
did you get session Id in your login response or not?
 
Kalapati SwapnaKalapati Swapna
Hi Chetan,

  Reset your security token and try again to get session id .

User-added image

Thanks,
Swapna.
Kalapati SwapnaKalapati Swapna
User-added image
Chetan KapaniaChetan Kapania
Hi Swapna,

This is the page from where I copied session id
User-added image

Then I pasted that onto workbench window which looks like this
User-added image
And then upon execute, I get the same result as before
User-added image
Regards
Chetan
Kalapati SwapnaKalapati Swapna
Hi Chetan,

   In Soap login response Session id didnt chage when you change the security token. so it is giving the  InvalidSessionId. 
"When you sign on via the login() call, a new client session begins and a corresponding unique session ID is generated. Sessions expire automatically after a predetermined length of inactivity, which can be configured in Salesforce from Setup by clicking Security Controls. The default is 120 minutes (two hours). If you make an API call, the inactivity timer is reset to zero.
When your session expires, the exception code INVALID_SESSION_ID is returned. If this happens, you must invoke the login() call again."

Thanks 
Swapna
Chetan KapaniaChetan Kapania
Hi Swapna,

I reset the security token and used the same for login() call, it generated new session id which I used but still showing invalid session id. And all that within 120 minutes.