Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

test.salesforce.com #32

Closed
chadwtaylor opened this Issue · 4 comments

2 participants

@chadwtaylor

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
Collaborator

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

@dburkes dburkes closed this
@chadwtaylor

Many thanks!

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

@chadwtaylor

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
Collaborator

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
Something went wrong with that request. Please try again.