+ Start a Discussion
Thomas StrohThomas Stroh 

"Login Rate Exceeded" Issues

We have a .Net service that uploads data to the SFDC data store via their APIs. Today I found that the user account that is leveraged for these uploads is locked out and has errors stating "Login Rate Exceeded".


After reviewing the newsgroups my understanding is that this error comes from exceeding the daily "API Requests". The problem is that when I login as a different user to check the "API Requests, Last 24 Hours" on the "Company Information" page,  it states my current level is only 80%.


I was hoping for some insight as to what is the root cause of this governor problem.





Login Rate Exceeded, is not related to the org wide limit of API calls, but to the number of times you specifically call the login method. Check your integration code to make sure you're only calling login once and not once for every api call.


I am facing same 'Login Rate Exceeded issue'. Would really appreciate your help on fixing this. I am new to SalesForce and first time doing this integration. I call the 'getConnection' method each time before making API call. Inside that method I check if connection is not null then I return the same connection object or else I create a new one.
I am not sure why I get this error. The method code is like below. Please help, it's urgent.


private EnterpriseConnection getConnection(boolean loginRequired){
		//get all the related properties
		String userName = sfdcProps.getProperty("sfdc.username");
		String password = sfdcProps.getProperty("sfdc.password");
		logger.warn(" \n\nloginRequired " + loginRequired +" UserName = " +userName + " pwd = " +password );
		if(connection != null && !loginRequired) {
			return connection;
				try {
					 ConnectorConfig config = new ConnectorConfig();
				     connection = Connector.newConnection(config);
							 LoginResult loginResult = connection.login(userName, password);
							 String sessionId = loginResult.getSessionId(); 
							 String serverUrl = loginResult.getServerUrl();
					 String authEndPoint = config.getAuthEndpoint();
				      // display current settings
				      logger.info("SessionId: " + connection.getSessionHeader().getSessionId());
				      logger.info("Auth EndPoint: "+ authEndPoint );
				      logger.info("Service EndPoint: "+ connection.getConfig().getServiceEndpoint());
				      logger.info("Username: "+config.getUsername());
				    }catch (ConnectionException e1) {
					    logger.error("Could not connect to SalesForce: " + e1.getMessage());
	    return connection;