rforce: Destination URL not reset error
I used rforce gem to connect with salesforce. When i am trying to call 'login_with_oauth' method i am getting the following error
RuntimeError: Unexpected error: {:Fault=>{:faultcode=>"UNKNOWN_EXCEPTION", :faultstring=>"UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService", :detail=>{:UnexpectedErrorFault=>{:exceptionCode=>"UNKNOWN_EXCEPTION", :exceptionMessage=>"Destination URL not reset. The URL returned from login must be set in the SforceService"}}}}
Hello. I'm sorry to hear of the trouble. Could you post a snippet of source code (with passwords/tokens removed) that recreates the problem?
Hello,
I am using the same snippet which you gave in doc. Below is the snippet
oauth_keys = { :consumer_key => ['consumer_key'], :consumer_secret => ['consumer_secret'], :access_token => ['access_token'], :access_secret => ['access_secret'], :login_url => 'https://login.salesforce.com/services/OAuth/u/20.0' }
binding = RForce::Binding.new('https://www.salesforce.com/services/Soap/u/20.0',nil,oauth_keys) binding.login_with_oauth
When i am calling login_with_oauth i got the above error.
Do you try to add your security token to your password ?
Hello fbenariac! ya i already tried those methods. Included..
Hi, folks. Thanks for reporting this. The issue was that the OAuth workflow was creating an extra connection to the server. Sorry about that! It should be working in the latest code now.
Thanks undess,
It is working fine.