• Tim Moore 39
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

We are using the Databasedotcom Ruby gem (essentially a REST wrapper) to authenticate to salesforce. The OAuth dance is randomly failing (1 out of 25 attempts) with the following message: 

 

client identifier invalid

 

The code is almost boilerplace code for authentication:

 

def self.authenticate(username, password)
  config = YAML.load_file(File.join(::Rails.root, 'config', 'databasedotcom.yml'))
  client = Databasedotcom::Client.new(config)
  begin
    access_token = client.authenticate :username => username, :password => password
    {:success => 'true', :message => 'Successful sfdc login.', :access_token => access_token}
  rescue Exception => exc
    {:success => 'false', :message => exc.message}
  end
end

 

Any ideas what could be causing it to fail randomly?

 

Thanks

 

Jeff Douglas

Appirio & CloudSpokes

http://blog.jeffdouglas.com