Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restforce::AuthenticationError - Login Rate Exceeded #412

Open
charlesemarsh opened this issue Oct 19, 2018 · 2 comments
Open

Restforce::AuthenticationError - Login Rate Exceeded #412

charlesemarsh opened this issue Oct 19, 2018 · 2 comments

Comments

@charlesemarsh
Copy link

Hello All,

When doing resource intensive jobs like background updating a whole bunch of accounts, I'm seeing this error message "Restforce::AuthenticationError" and my user is being locked out of salesforce.

After checking the login logs, I can see that I'm hitting the login rate limit and Salesforce is erroring with 'Login Rate Exceeded', slowing it down isn't really an option for me as I need a lot updated quickly.

I'm guessing that I've missed something, but before I drive myself crazy with the 4th night of coding, I thought it was time to ask. Any advice you could give me would be much appreciated.

@sicktastic
Copy link
Collaborator

@charlesemarsh How are you authenticating with Restforce?

@charlesemarsh
Copy link
Author

charlesemarsh commented Dec 12, 2018

def restforce
    client ||= Restforce.new(
      username: Settings.salesforce.username,
      password: Settings.salesforce.password,
      security_token: Settings.salesforce.security_token,
      client_id: Settings.salesforce.client_id,
      client_secret: Settings.salesforce.client_secret,
      api_version: Settings.salesforce.api_version,
      authentication_callback: Proc.new { |x| Rails.logger.debug x.to_s },
      cache: Rails.cache,
      host: Settings.salesforce.host)
  end

Just the username and password method, nothing special

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants