• IcarusMaximus
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I am trying to implement a PHP API setup for a client. My code works perfectly with my Developer Account Login and Password/Token. However, when I replace my username and password/token with my client's username/pass/token, I get the following response:

Array ( [faultcode] => ns1:INVALID_LOGIN [faultstring] => INVALID_LOGIN: Invalid username, password, security token; or user locked out. [detail] => Array ( [fault] => Array ( [exceptionCode] => INVALID_LOGIN [exceptionMessage] => Invalid username, password, security token; or user locked out. ) ) )

I had the client reset their password and security token just to make sure, and login still fails. The client has confirmed for me that her profile includes API Access. I am out of ideas on how to fix this. One account works perfectly, and the other fails every time. What am I missing here?

By the way, this is a non-profit account that I am working on.
I am trying to implement a PHP API setup for a client. My code works perfectly with my Developer Account Login and Password/Token. However, when I replace my username and password/token with my client's username/pass/token, I get the following response:

Array ( [faultcode] => ns1:INVALID_LOGIN [faultstring] => INVALID_LOGIN: Invalid username, password, security token; or user locked out. [detail] => Array ( [fault] => Array ( [exceptionCode] => INVALID_LOGIN [exceptionMessage] => Invalid username, password, security token; or user locked out. ) ) )

I had the client reset their password and security token just to make sure, and login still fails. The client has confirmed for me that her profile includes API Access. I am out of ideas on how to fix this. One account works perfectly, and the other fails every time. What am I missing here?

By the way, this is a non-profit account that I am working on.
Okay, I know this is going to be a dumb question, and I know it's going to irritate some people that I'm even asking, because I'm sure the answer exists somewhere.   However, I can't find it easily and so I'm asking for help.
 
I just want a simple explanation of how to get a php page on my server to connect my salesforce.com account and display any piece of data from that account.  I will probably use the Partner WSDL but other than knowing where to find that xml file to download, I am lost.  I don't know how to use that xml file or even where to put it for use, much less make a connection through it.
 
Any help would be appreciated.
Hi, I'm getting a persistent INVALID_LOGIN problem...

I am 100% sure the username and password are right.  I cut and paste them into the web login and that worked. 
The wsdl is a fresh download from this morning and it is accessible in that spot.



here's the code.  it's just a little POC for connecting to SF via PHP api and nothing is doing yet:

ini_set("soap.wsdl_cache_enabled", "0");
require_once (DIR_FS_SF_SOAP_CLIENT.'SforceEnterpriseClient.php');
require_once (DIR_FS_SF_SOAP_CLIENT.'SforceHeaderOptions.php');

try
{

   
    $mySforceConnection = new SforceEnterpriseClient ();
    $mySoapClient = $mySforceConnection->createConnection(DIR_FS_SF_SOAP_CLIENT."enterprise.wsdl.xml");
    $mylogin = $mySforceConnection->login("XXX", "YYY");

      $userResult = $mylogin->userInfo;
      print_r($userResult);
      echo $userResult->userFullName.', your session id is '.$mylogin->sessionId;

      $query = 'SELECT * FROM Opportunity';
      $response = $mySforceConnection->query(($query));

      print_r($response);

      foreach ($response->records as $record)
      {
       print_r($record);
      }

      print_r($mySforceConnection->getLastRequest());

      $bagent = $_SERVER["HTTP_USER_AGENT"];
      echo '<b>USER AGENT:</b> '.$bagent.'<br><br>';

}
catch (Exception $e)
{
  echo $e->faultstring;
}
  • November 08, 2007
  • Like
  • 0

Hi
I am trying to get picklist values (and modify them ) in the PHP API.
I can only find examples in Java and .NET.
I don't mind converting the examples to PHP , but I get stuck at the point of creating the object .


The object's class definition is not in the SS include files!
DescribeSObjectResult is only mentioned in the wsdl file .
How does this work? is the object created remotely?

I will really appreciate a PHP sample!