Title: Maps API Key High Usage
Last modified: May 10, 2023

---

# Maps API Key High Usage

 *  Resolved [jcfergus](https://wordpress.org/support/users/jcfergus/)
 * (@jcfergus)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/maps-api-key-high-usage/)
 * Beware of setting up your own Google Maps API key in The Events Calendar! I woke
   up this morning to a $1000 bill from GCP for Geocoding API usage, for my brand
   new site that has thus far received about 6 hits per day. The api key was referrer
   restricted, so it’s almost definitely actual requests coming from TEC, but I’m
   at a loss for why. (There was also a $200 budget set on it, but by the time I
   got a notification it was at $1000.) I’ve got a support ticket in with Google,
   but … beware, this plugin is dangerous.

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16555983)
 * Hi [@jcfergus](https://wordpress.org/support/users/jcfergus/)
 * Thanks for reaching out, and my sincerest apologies for the inconvenience.
 * I just would like to confirm, after applying restrictions to your Google Maps
   API key, were you using only one Google Maps API key for the following: Geocoding
   API, Maps JavaScript API, and Maps Embed API?
 * If so, please kindly note that these APIs cannot work with the same restrictions.
   The workaround is to use two separate Google Maps API Keys and apply 2 different
   restrictions.
 * See- **[Creating Google Maps API Key Restrictions](https://theeventscalendar.com/knowledgebase/k/using-google-maps-api-key-restrictions/)**
 * Moreover, could you provide the version of the following? This will help me understand
   how your system is set up.
    - PHP
    - WordPress
    - The Events Calendar
    - Theme
 *  Thread Starter [jcfergus](https://wordpress.org/support/users/jcfergus/)
 * (@jcfergus)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16556059)
 * Interesting. I was using a single API key – configured per the instructions at
   [https://theeventscalendar.com/knowledgebase/k/setting-up-your-google-maps-api-key/](https://theeventscalendar.com/knowledgebase/k/setting-up-your-google-maps-api-key/)
   and restricted based on Referer. I did not see the “restrictions” page that you
   linked to specifically. (And I probably would have skipped the Geocoding piece
   anyway since it says that’s only for TEC Pro and I’m not using Pro.)
 * It appears that (from working with Google Maps support) something caused the 
   geocoding API to get spammed with repeated client-side requests from my browser
   for several hours – about 1M requests in the span of 12-ish hours. (Stopped when
   I accidentally rebooted my machine, unrelatedly.) I’m fairly sure I had at least
   a couple of events that I’d been editing open in tabs during this period, I’m
   wondering if something got into a bad state and just kept retrying the same API
   query in the background. (That’s just a hunch, having not looked into the code–
   it’s been a while since I’ve written or read any PHP.)
 * This site currently gets little to no traffic, so I’m confident that it was a
   bug or a misbehavior somewhere and not legit traffic, especially after working
   with Google Maps support.
 * Version wise:
 * WordPress 6.1.1
   PHP 8.1TEC: 6.0.10Theme: BlocksyInstalled Plugins: ActivityPub,
   Blocksy Companion, Jetpack, Jetpack Boost, NodeInfo, Sitekit, TEC, WebFinger,
   WP Super Cache.
 *  Thread Starter [jcfergus](https://wordpress.org/support/users/jcfergus/)
 * (@jcfergus)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16559195)
 * I just wanted to follow up here; the total amount ended up being almost $5000,
   which Google has been kind enough to credit me as a one-time adjustment. But 
   I definitely won’t be sticking a personal API key into TEC again anytime soon,
   at least not without setting a very strict usage quota on said key.
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16566907)
 * Hi [@jcfergus](https://wordpress.org/support/users/jcfergus/)
 * Thanks for your message, and for making us aware of this issue.
 * We already created an internal bug ticket for this, and I added your case. Thanks
   for all the details. I will definitely pass it along to our devs.
 * While we don’t have an ETA, you’ll get notified once there is an update and fix.
 * Best,
   Darian
 * —–
   Internal Bug Ticket Reference: TEC-4741
 *  Thread Starter [jcfergus](https://wordpress.org/support/users/jcfergus/)
 * (@jcfergus)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16637399)
 * Honestly, I switched to a different event calendar plugin. Partially for this
   reason, partially for other reasons (it better fit my use case).
 *  Thread Starter [jcfergus](https://wordpress.org/support/users/jcfergus/)
 * (@jcfergus)
 * [3 years ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16726421)
 * > I am sorry, I have received an email notifying me of a response to this thread,
   > but as I came here to read it I found that my post disappeared, along with 
   > six or seven other posts – the thread was two pages long, the message before
   > mine was about two days old.
   > What happened?
 * Seems like someone with TEC decided this was making them look bad and deleted
   all the other instances of the problem. 🤬
 *  [elenaocone](https://wordpress.org/support/users/elenaocone/)
 * (@elenaocone)
 * [3 years ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16726438)
 * [@jcfergus](https://wordpress.org/support/users/jcfergus/)
 * I could not believe that…
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [3 years ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16726473)
 * > Seems like someone with TEC decided this was making them look bad and deleted
   > all the other instances of the problem. 🤬
 * You’re wrong.
 * I’m a forum moderator. This topic had a pile on and I asked [@elenaocone](https://wordpress.org/support/users/elenaocone/)
   like this.
 * > [@elenaocone](https://wordpress.org/support/users/elenaocone/)
   > If you need support then per the forum guidelines please start your own topic.
   > [https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too](https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too)
   > You can do so here.
   > [https://wordpress.org/support/plugin/the-events-calendar/](https://wordpress.org/support/plugin/the-events-calendar/)
 * And then archived the replies. As my reply indicated, that’s not how these forums
   work.
 *  [elenaocone](https://wordpress.org/support/users/elenaocone/)
 * (@elenaocone)
 * [3 years ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16726627)
 * [@jdembowski](https://wordpress.org/support/users/jdembowski/) [@jcfergus](https://wordpress.org/support/users/jcfergus/)
 * I read your email, and I could not believe you deleted the thread replies on 
   purpose, so I politely asked what happened.
 * I did not reply with a “me too”, and BTW in the same link you provided that is
   gently discouraged but anyway permitted / not against forum rules, and with good
   reason: a forum is made for users to come together with similar problems and 
   suggest possible solutions.
 * What would be the ratio in starting my own topic if the topic is the same? And
   are you implying that the number of people experiencing the same problem is not
   relevant?
 * And of what help would it be for the users a support forum where you simply cut
   all latest replies?
 * Ok, you Moderators got overwhelmed, it happens. Now please restore the replies.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [3 years ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16726863)
 * No.
 * These are not general discussion forums, these are not anyone’s blog. If you 
   want to have a blog post discussion then do it on another site.
 * This support forum is for users who need help with this plugin. That is not this
   topic, that is not those replies. At best this topic is a PSA (it’s not here).
   At worst it is a blog post and that is never appropriate for these support forums.
 * I’m closing this topic to new replies. The old replies will remain archived. 
   If anyone needs support for this plugin then feel free start a support topic.
 * You can do so here.
 * [https://wordpress.org/support/plugin/the-events-calendar/](https://wordpress.org/support/plugin/the-events-calendar/)
 * If anyone feels the needs to blog then take it somewhere else. That’s not what
   this site is for. It’s for supporting this plugin only and other plugins, themes
   and core WordPress.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [3 years ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16765079)
 * [@jcfergus](https://wordpress.org/support/users/jcfergus/) [@elenaocone](https://wordpress.org/support/users/elenaocone/)
 * Moderator note: “Seems like someone with TEC decided this was making them look
   bad and deleted all the other instances of the problem. 🤬”
 * No, not at all. [@webtaurus](https://wordpress.org/support/users/webtaurus/),
   you jumped onto another person’s support topic and, as noted int he forum guidelines
   at [https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too](https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too),
   we ask you to start your own topics.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Maps API Key High Usage’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [api key](https://wordpress.org/support/topic-tag/api-key/)

 * 12 replies
 * 4 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/maps-api-key-high-usage/#post-16765079)
 * Status: resolved