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

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 =
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 and click
# Setup | My Personal Information | Reset Security Token.


Execute EZSAASExecute EZSAAS
Read this:

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