+ Start a Discussion
skettiosskettios 

Sandbox Login via PHP

I can login to production just fine with my code.  But when I switch the wsdl to the sandbox one (the only change I make to my code), I get the following:

 

INVALID_LOGIN: Invalid username, password, security token; or user locked out.
Fatal error: SoapClient::__setSoapHeaders() [<a href='soapclient.--setsoapheaders'>soapclient.--setsoapheaders</a>]: Invalid SOAP header in C:\xampp\htdocs\SFApp\Includes\soapclient\SforceBaseClient.php on line 273

I do have the ini_set("soap.wsdl_cache_enabled", "0" ) ; line in my code.

 

 

What's going on?  Do I need to get a new security token for the sandbox?

 

Message Edited by skettios on 03-24-2010 03:49 PM
Best Answer chosen by Admin (Salesforce Developers) 
Park Walker (TAGL)Park Walker (TAGL)

You'll need a new security token, and remember that your user name needs to have the sandbox name appended to it (e.g. user@company.com.dev).

 

Park 

All Answers

Park Walker (TAGL)Park Walker (TAGL)

You'll need a new security token, and remember that your user name needs to have the sandbox name appended to it (e.g. user@company.com.dev).

 

Park 

This was selected as the best answer
skettiosskettios

Awesome, works now! (needed a new security token, already had the username.dev)

 

Thanks!

Message Edited by skettios on 03-25-2010 10:26 AM
snappersnapper

Hi all, i am having an issue with the same error:

INVALID_LOGIN: Invalid username, password, security token; or user locked out.

 

I know for sure that my username and password are correct, but when i add my security token to the end of my password i get the same error. I dont mind which method I can use, apart from that it's PHP based.

 

Any suggestions are greatly appreciated!

 

Thanks in advance.

 

PS. I also dont think it is sandbox mode.