Title: Google Maps API server rejected your request
Last modified: August 20, 2016

---

# Google Maps API server rejected your request

 *  [John](https://wordpress.org/support/users/john-pingtech/)
 * (@john-pingtech)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/google-maps-api-server-rejected-your-request/)
 * After recently installing 1.7 of the plugin, I started getting the following 
   pop-up warning window in the browser when visiting my site:
 * > The google maps api server rejected your request. The “Sensor” parameter specified
   > in the request must be set to either “true” or “false”.
 * I was able to track it down to wp-content/plugins/hubspot/inc/hs-contact.php.
   On line 26 it reads:
 * >  function hs_contact_scripts() {
   >  wp_enqueue_script(‘google-maps’, ‘[http://maps.google.com/maps/api/js?sensor=true&#8217](http://maps.google.com/maps/api/js?sensor=true&#8217););}
 * Commenting this out with a “//” resolved the error.
 * What functionality does this provide? What am I going to miss out on with tracking
   with this commented out?
 * According to the google API docs, it states the following format should be used:
 * > `https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE"`
 * With the API_KEY being your google apps api. Do I need to set up a google apps
   api for this functionality to work?
 * What needs to be done in order to be able to uncomment this line and have the
   unknown functionality enabled?
 * [http://wordpress.org/extend/plugins/hubspot/](http://wordpress.org/extend/plugins/hubspot/)

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

 *  Thread Starter [John](https://wordpress.org/support/users/john-pingtech/)
 * (@john-pingtech)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/google-maps-api-server-rejected-your-request/#post-3470514)
 * I updated the plugin to 1.8.2 and still I am getting this error on EVERY page
   load. Absolutely frustrating…
 * I had to go back and re-implement the above work-around to rectify.
 * As a paying member for Hubspot, I called support. The canned answer is to take
   it up on the forums. <priceless>
 *  [webbwow](https://wordpress.org/support/users/webbwow/)
 * (@webbwow)
 * [13 years ago](https://wordpress.org/support/topic/google-maps-api-server-rejected-your-request/#post-3470524)
 * This worked for me {using a different theme}.
 * Go to Appearance > Editor > Theme Functions (functions.php)
 * Find: `wp_enqueue_script( 'googleapis', 'http://maps.googleapis.com/maps/api/
   js?v=3&sensor=true');`
 * Replace with: `wp_enqueue_script( 'googleapis', 'https://maps.googleapis.com/
   maps/api/js?sensor=false');`
 * From what I understand, this is related to the Map located on most contact pages.
 *  [plannerguy](https://wordpress.org/support/users/mdlepage/)
 * (@mdlepage)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/google-maps-api-server-rejected-your-request/#post-3470530)
 * webbwow’s fix should be implemented.
 * I have SSL on my site and because the google maps api is enqueued as http: I 
   keep getting “Display unsecure content” messages for all of my users.
 * Perhaps this should be
    `wp_enqueue_script( 'googleapis', '//maps.googleapis.
   com/maps/api/js?sensor=false');` which will then apply http or https depending
   on if the site has SSL or not.
 *  [Clarissa Burton](https://wordpress.org/support/users/qotp1129/)
 * (@qotp1129)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/google-maps-api-server-rejected-your-request/#post-3470543)
 * I didn’t have this issue until I installed Eventbrite plugin. I’ve uninstalled
   the plugin; however, I continue to receive this error message. I have checked
   the theme’s function.php file and searched for the code you provided; however,
   there isn’t such code listed. How do I clear this error message when I don’t 
   have an active plugin? Is there another .php file I should search?

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

The topic ‘Google Maps API server rejected your request’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/hubspot_ffe6d3.svg)
 * [HubSpot for WordPress](https://wordpress.org/plugins/hubspot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hubspot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hubspot/)
 * [Active Topics](https://wordpress.org/support/plugin/hubspot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hubspot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hubspot/reviews/)

## Tags

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

 * 4 replies
 * 4 participants
 * Last reply from: [Clarissa Burton](https://wordpress.org/support/users/qotp1129/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/google-maps-api-server-rejected-your-request/#post-3470543)
 * Status: not resolved