• bkus
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hello all,

 

I am attempting to make a connection to our SandBox environment programatically with the API.


When I connected to our production environment, I did so using PERL as follows:


use WWW::Salesforce::Simple;

my $sforce = WWW::Salesforce::Simple->new(
    'username' => $user,
    'password' => $pass,
);



the wsdl.jsp file contains the line:

<port binding="tns:SoapBinding" name="Soap">
   <soap:address location="https://www.salesforce.com/services/Soap/c/15.0"/>
</port>

This worked fine.


However, what I want to do is connect to the SandBox environment.


I appended  ".<our sandbox name>"   to the end of the username.
(I was able to login successfully with this username and it's password at https://test.salesforce.com with

a Web browser so I know my credentials are correct).


In the wsdl.jsp file I tried both the above snippet as well as:



<port binding="tns:SoapBinding" name="Soap">
   <soap:address location="https://test.salesforce.com/services/Soap/c/15.0"/>
</port>


My Perl script that I am using to try to connect is:

#!/usr/bin/perl -w
use strict;

use WWW::Salesforce::Simple;


my $user = '<the username I successfully used on Web browser with sandbox name appended>';
my $pass = '<our password>';

my $sforce = WWW::Salesforce::Simple->new(
    'username' => $user,
    'password' => $pass,
);


print "done\n";




When I run this script I get the following error:

INVALID_LOGIN: Invalid username or password or locked out. at ./connect.pl line 10

 

Not sure how to resolve this. Any assistance with this would be greatly appreciated.

 

 

Regards,

 

RanS

  • February 26, 2009
  • Like
  • 0
Attached is a new Perl sample that takes an inbound email (via procmail), and uploads its contents as set of notes and/or attachments to a given salesforce.com record. Useful in created email2case systems, and other types of customforce integrations.

Adam
  • December 29, 2005
  • Like
  • 0