The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Over Marshery limit on new application

Highlighted
Member

Over Marshery limit on new application

I am switching a client's CC signup form on their site (running on WordPress) to the new API. I modified a third-party plugin to do what is required and tested it locally and on the live site. It worked but I found it lacking and started writing one myself; the site will using the modified plugin until I am finished. However, I am now getting a Mashery over-limit error, even with your sample code.

 

The signup form has been tested under a dozen times total. There is no evidence of hacking, as there are under 1000 contacts in one mailing list being used and 0 in the other. And, while the site probably did have over 10k hits so far this am (from all sources, including bots), this would mean that a) a signup form cannot "getLists()" since that would count towards the limit and/or b) a signup form cannot be on every page, since that would multiply the number of API calls by the number of pages on the site as bots index it.

 

If the above is correct, it seems the list id(s) must be stored locally, hard coded in the form or at least retrieved with an Ajax call, eliminating the problem of bots. Am I correct in this thinking?

 

I would just get another API key, but that wouldn't solve the problem.

 

Also, when getting the API key, I needed to put in the site that is using it. How does that affect local development? I develop on a web server on a lan that only I have access to. Do I need to work on my desktop so the url is "localhost"?

 

 

3 REPLIES 3
Highlighted
Moderator

Re: Over Marshery limit on new application

Hello @RPC,

 

Thank you for reaching out to Constant Contact's API Support.

 

You will want to GET the list IDs once and store them. Retrieving them all the time is eating up your API calls and is not needed unless you are constantly changing your list names.

 

The redirect URI is for authorization needs. It does not affect development unless you are not comformtable with where you have it being redirected to during authorization. You are welcome to create one API key for development and one API key for live use.


Regards,
Jimmy D.
Tier II API Support Engineer
Highlighted
Member

Re: Over Marshery limit on new application

Well, if the problem is getting the list ids, you should change your sample code, which does exactly that! As do (at least) several of the WP CC plugins I looked at. It might also be good to add this as a "suggestion" somewhere in the developer documentation, as most site owners will want a mailing list signup form to be global on their sites. Something like getListIdByListName() might also be nice to have to make things easier.

 

No problem changing my application, though, but it looks like I'm done working on it today.

Highlighted
Moderator

Re: Over Marshery limit on new application

Hi @RPC,

 

I will run this by the team and see about changing the documentation. Thanks for the feedback.


Regards,
Jimmy D.
Tier II API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured