You need to sign in to do that
Don't have an account?

Authenticate Against Salesforce
I'm trying to figure out how to use Salesforce to authenticate against. I'm using the API to make a login call against the SF API, but it requires the token, not just the username and password.
In order to get connected in the first place, I have turned off SSL verification; perhaps this is the issue. Here's the experimental code I'm using (Ruby):
---
require 'soap/wsdlDriver'
wsdl = "file:///Users/wycats/Documents/salesforce.wsdl" # our wsdl generated by SF
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
driver.options['protocol.http.ssl_config.verify_mode'] = OpenSSL::SSL::VERIFY_NONE
driver.login(:username => "", :password => "")
# Result
# SOAP::FaultError: LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, password, security token; or user
# locked out. Are you at a new location? When accessing Salesforce--either via a desktop client or the
# API--from outside of your company’s trusted networks, you must add a security token to your password to
# log in. To receive a new security token, log in to Salesforce at http://www.salesforce.com and click
# Setup | My Personal Information | Reset Security Token.
---
Ideas?
In order to get connected in the first place, I have turned off SSL verification; perhaps this is the issue. Here's the experimental code I'm using (Ruby):
---
require 'soap/wsdlDriver'
wsdl = "file:///Users/wycats/Documents/salesforce.wsdl" # our wsdl generated by SF
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
driver.options['protocol.http.ssl_config.verify_mode'] = OpenSSL::SSL::VERIFY_NONE
driver.login(:username => "", :password => "")
# Result
# SOAP::FaultError: LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, password, security token; or user
# locked out. Are you at a new location? When accessing Salesforce--either via a desktop client or the
# API--from outside of your company’s trusted networks, you must add a security token to your password to
# log in. To receive a new security token, log in to Salesforce at http://www.salesforce.com and click
# Setup | My Personal Information | Reset Security Token.
---
Ideas?
You can either get the security token from App Setup using clear instructions in above article. Or add your machine/server IP address to the trusted IP addresses
Message Edited by Execute EZSAAS on 03-13-2008 05:37 PM