cancel
Showing results for 
Search instead for 
Did you mean: 

API Rate Limit Question

SOLVED
Advisor

API Rate Limit Question

I am getting the following message...mashery.not.authorized.over.ratelimit:The Mashery account associated with this request is over its rate limit quota.

 

The program (C# using the API wrapper interface) is in a loop in which each time through the loop it issues one API call to retrieve a particular contact and a second API call to update the contact.

 

I had thought that introducing a 1-second delay between the processing of each contact would address this, but it does not. In fact once I get this message even once, every sugsequent call to any api produces this error.

 

Before the program goes into its main loop, it uses the GetLists API to retrieve all the lists. I brought the program down and about 15 minutes later started it up again. The call to GetLists this time produced this error message even after waiting 15 minutes.

 

Is there a workaround for this? Also, why would I get it in the first place with 1-second delays between each pair of API calls?

5 REPLIES 5
Advisor

Re: API Rate Limit Question

I got my answer. The code exceeded the daily 10,000 api call limit.

Moderator

Re: API Rate Limit Question

Hi Mike,

 

If you are hitting your daily rate limit when adding/updating contacts individually (which sounds like what's happening), consider using the bulk contact export and import (multipart or JSON) endpoints instead. Export the contact lists you want to sync, do the compare/update, the import the updated contact list. 

 

It's a lot more efficient on your systems and ours, reducing the number of calls required to update a list membership of 20,000 contacts to 2 calls. Export the current list, Import the revised list. 

 

Let me know if this is applicable, or helpful.

 

Thanks,

Rich

Rich Marcucella
Sr. Technical Writer, Content Developer
Web Services Team
http://developer.constantcontact.com
Advisor

Re: API Rate Limit Question

Thank you Richard. I really appreciate the information. We are running into this situation on a utility I wrote to download and save status and other attributes of several contacts. The utility I wrote was just something that would allow me to determine if we are making any mistakes in our production software such as showing them as active in our database but having them with status 'DELETED' in yours.

 

The code I was writing is not considered production code and since I am responsible for developing and maintaining production code, I won't have time right away to figure out how to use these bulk handling APIs.

 

Looks like the C# wrapper code has support for these bulk APIs. I will give it a try as time permits. Again, thank you very kindly!!

Highlighted
Occasional Participant

Re: API Rate Limit Question

I'm having a similar "mashery.not.authorized.over.ratelimit" apache error with a php script that's pulling the registrants for a particular event. This Linux box cron job is set to check every 10 minutes, as is a similar script for a different event. I've cleared all running processes and tried kicking this off again manually, but it dies immediately. Do I need to reset something on the Constant Contact side?

 

Thanks,
John

Moderator

Re: API Rate Limit Question

Hi John,

 

Once you hit your daily rate limit of 10,000 calls, you need to wait until 12:00 midnight for the rate limit to be reset for the next 24 hours. There are two solutions here:

  • Determine if our Technology and Platform partner program is something you'd like to participate in. Once a partner, you get higher rate limits.
  • Examine your code to see why you are making so many calls per 24 hours. Review our API Documentation and determine if there is a more efficient way for your code to accomplish its objective using few calls, making calls less frequently, etc. We always recommend using our bulk import API when adding many contacts, instead of adding contacts individually.

Hope this helps. 

 

Best Regards,

Rich Marcucella
Sr. Technical Writer, Content Developer
Web Services Team
http://developer.constantcontact.com