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
rd7rd7 

production vs sandbox

With some suggestions from SimonF on this board i was able to succesfully send a login() request and get a valid response.  That was on the production server.  Now I'm trying to do the same request to my sandbox and am getting a 'invalid login'. 

The only changes i made were the endpoint and the username (added .sandboxname). 

response:

      <soapenv:Fault>
         <faultcode>sf:INVALID_LOGIN</faultcode>
         <faultstring>INVALID_LOGIN: Invalid username, password, security token; or user locked out.</faultstring>
         <detail>
            <sf:LoginFault xsi:type="sf:LoginFault">
               <sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode>
               <sf:exceptionMessage>Invalid username, password, security token; or user locked out.</sf:exceptionMessage>
            </sf:LoginFault>
         </detail>
      </soapenv:Fault>

dragonmagicldragonmagicl
Suggestion : Are you sure the security token is the same on prod as sandbox? I would reset on sandbox, mod code appropriately, and re-try.
NasipuriNasipuri

Hi ,

 

Please note that the web service end point for the production and sandbox is differect.

 

 

https://test.salesforce.com/services/Soap/u/15.0   (sandbox , with API version 15 , partnet WSDL)

 

https://www.salesforce.com/services/Soap/u/15.0 (production, with API version 15 , partner WSDL)

 

If you are using enterprize WSDL the URL will be like   (/services/Soap/c/15.0)

 

 

Your security token will be different in both environment.

 

Thanks and Regards,

Dinesh

Dinesh.Nasipuri@gmail.com

 

rd7rd7

Not sure how to get the security token for the sandbox.  If I reset it it is sent to my email address with the .sandboxname appended to the end of my email address so I'm sure it's getting bounced and never reaching me.

NasipuriNasipuri

Change your email address in the User of the sandbox to a actual email id,

 

Once you change your email salesforce will send you a link to the new email , to confirm .

After that you to your security token reset and will receive in your new email.

 

Regards,

Dinesh

Dinesh.Nasipuri@gmail.com