• Resolved stephenerik

    (@stephenerik)


    Hi,

    I’ve been struggling to get this plugin working.

    I have created a fresh wordpress installation. Installed the Google Places Reviews plugin, activated it, entered my Google API “Server” key, allowed the ip address of my server in Google’s API manager and then tried to enter a “Location Lookup” and when the page renders I always get the error “INVALID REQUEST: Please check that this widget has a Google Place ID set.”

    The page is:
    http://thearchers.id.au/wp2/sample-page/

    When I open the Developer Console in Chrome I can see errors:
    Google Maps API warning: NoApiKeys
    Google Maps API warning: SensorNotRequired
    Google Maps API error: MissingKeyMapError

    I then wrote some code myself inside a html file (not in the wordpress environment) and I was able to use my API key to get access to my reviews. I then inspected the Network tab on the Developer Console in chrome and noticed that when my test html file called:
    https://maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate
    It passed in the API Key but when the plugin called the same endpoint it had no API key in the query string.

    I have definitely entered the API Key in Settings->Google Reviews but its like the plugin is ignoring it.

    Thanks in advance.

    Stephen

    https://wordpress.org/plugins/google-places-reviews/

Viewing 9 replies - 16 through 24 (of 24 total)
  • I’m similarly experiencing issues with getting this plugin working correctly. I followed the directions on your page for creating an API key, and both APIs are enabled for the API key that I’m using. I copied & pasted the API key into your settings, but I cannot seem to get the plugin to display on our website. The error I’m seeing instead is:

    REQUEST_DENIED: This IP, site or mobile application is not authorized to use this API key. Request received from IP address ###.###.###.###, with empty referer
    (I replaced the numbers with #)

    The first time I tried posting it, I inspected the page when the error showed up, and it gave me a URL that I should add to the list of referrers, but it still won’t work. I’ve got *browningreagle.com* & http://browningreagle.com/wp-admin/widgets.php listed as referrers in my API Credentials (the latter being the one which the error code said to add).

    Here’s a page from our site, and I’m trying to put the plugin in our right sidebar (you might need to scroll down just a little in order to see it):

    http://browningreagle.com/personal-insurance/auto/motorcycle/

    Please let me know what you think might be going wrong, and what I could do to fix it. Thanks!

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    This is definitely a issue with how your API is configured. I’d start with clearing out the IP Address from the API settings so that it’s open to any user.

    After you do that, go into the Google Review widget, open the Advanced section and hit the “Clear Cache” button.

    Once you have it working without any Referrers or IPs then you can experiment with different formats of your IP address and/or url as the Referrer.

    Thanks!

    Thanks for the quick reply Matt! I’m fairly new to APIs, so I might need more help with some of the small stuff. Prime example, how do I clear the IP Address from the API settings?

    Additionally, from the Credentials screen for this particular project, should I do the Domain Verification for my website? I figured listing my website under Referrers would be sufficient, but perhaps this is a missing piece of the puzzle? I have verified our business on Google, so that shouldn’t be contributing to the issue, but it seems like the domain verification is another side of the coin.

    And similar to the OP, I’ve also noticed when I open the Developer Console in Chrome for my website, I get two Google Maps API errors: NoApiKeys & SensorNotRequired. These two errors have appeared for as long as I can remember when looking at the Developer Console, so I always ignored them since everything still seemed to be working properly.

    Thanks for any advice you can offer!

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Here’s what I’d suggest:

    1) It’s very possible that you have other plugins that are supposed to use the Maps API key as well, but haven’t been updated to use it correctly. For troubleshooting our plugin, disable all other plugins for now so we can isolate this issue.
    2) Remove all HTTP referrers for now until it works correctly. Whether you are using your IP Address or your domain for now just delete all of them. You can edit your API key by going to https://console.cloud.google.com, then choose your API, then click on “Enable and Manage APIs”, then click on “Credentials” and click on the linked name of your API key. Make sure there are NO HTTP Referrers there at all.
    3) The SensorNotRequired will not cause any trouble and can be ignored for now.

    Let me know how that goes.

    So here’s what I’ve figured out. I did as you said and disabled all of the other plugins, cleared the Referrer list for the API, and cleared the cache for this plugin. After doing all of this, the plugin worked fine. I slowly added plugins again in groups of two, until I had most re-activated (I left a couple out that I deemed unnecessary). The Google Reviews plugin still worked at this point.

    Thinking that the issue could have been with one of the two plugins I choose to keep deactivated, I went and added my domain back to the referrer list. I added it as *browningreagle.com*, at which point I cleared the plugin cache again, and the problem resurfaced. After I removed the domain from the referrer list again, the plugin worked properly.

    How should I proceed from here?

    And thanks for your help Matt!

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi there,

    Make sure there’s a dot before the domain name, and a slash after it like this:

    *.browningreagle.com/*

    For good measure I would add the following as well:
    *www.browningreagle.com/*

    Thanks!

    The forward-slash at the end would make sense due to the fact that this plugin is in our sidebar, which appears on every page except the homepage. However, our domain appears simply as “browningreagle.com” with no www at the beginning. Even if I copy & paste the URL, it appears as “http://browningreagle.com”.

    Would entering it with the *. at the beginning still work in this case?

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Yes, the period is necessary and the asterisk.

    Sorry for the delayed response Matt.

    I’ve tried entering the Referrer as you said: *.browningreagle.com/* & *www.browningreagle.com/*
    I deactivated all plugins except for Google Places Reviews, and cleared the cache for the plugin. Unfortunately, I still receive that same Request Denied error.

    Should I try looking into doing the Domain Verification that can be found on the Credentials page?

Viewing 9 replies - 16 through 24 (of 24 total)

The topic ‘Problem with API key’ is closed to new replies.