Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

test.salesforce.com #32

chadwtaylor opened this Issue Nov 7, 2011 · 4 comments


None yet
2 participants

I need to access the test.salesforce.com (sandbox environment) through this gem.

Is this possible and if so, how do I get it to hit up the sandbox environment rather than login.salesforce.com?


dburkes commented Nov 8, 2011

Specify the :host option when creating your Client, e.g, Databasedotcom::Client.new :host => "test.salesforce.com", ...

@dburkes dburkes closed this Nov 8, 2011

Many thanks!

Would be nice to include that in the README/Instructions for others who may need this?

I logged in the sandbox account at test.salesforce.com using the email address appended with ".test" as required and got in fine.

Trying the same successful credentials through this gem per your instructions:

client = Databasedotcom::Client.new :host => "test.salesforce.com"

Object dump of the client (client id/secret stripped for security purposes):

#<Databasedotcom::Client:0x007fa8150ef5c8 @options={:host=>"test.salesforce.com"}, @client_id="xxx", @client_secret="xxx", @host="test.salesforce.com", @debugging=nil, @version=nil, @sobject_module=nil, @ca_file=nil, @verify_mode=nil>;

I get a Password Invalid error. Can you confirm that logging into your sandbox account through this gem works for you? Unless you know what I'm missing here?


dburkes commented Nov 10, 2011

If your Salesforce instance requires a security token, you need to append that to your password. See the section entitled "Authentication via username and password" at https://github.com/heroku/databasedotcom/blob/master/README.rdoc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment