Title: Error using Google API
Last modified: March 6, 2020

---

# Error using Google API

 *  Resolved [frepho](https://wordpress.org/support/users/frepho/)
 * (@frepho)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-using-google-api/)
 * Hey Noah,
 * I just experienced a strange error.
    I did the recommended set up for the Plug
   in with a new Project in the Google Developer’s Console, then I stumbled across
   the error.
 * At first with “We’re open” then I retested it with your Rating Plugin.
    Both 
   of your Plug-ins show me the same Error message: “Error: Your Google API Key 
   is not valid for this request and permission is denied. Please check your Google
   API Key.” But in the Google Developer’s Console the new API Key shows multiple
   uses, but everytime it is reportet as a error in the Developer’s Console.
 * The Rating Plugin shows this as retrieved data:
    “error_message”: “This IP, site
   or mobile application is not authorized to use this API key. Request received
   from IP address 2a03:4000:30:8a40::13:5825, with referer: [https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJrTLr-GyuEmsRBfy61i59si0&language=de&fields=icon%2Cname%2Cpermanently_closed%2Cformatted_address%2Cvicinity%2Crating%2Creview%2Curl%2Cuser_ratings_total&key=AIzaSyB-zEVXy9fHODQ8eKwjywlOqiulbi84i&#8221](https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJrTLr-GyuEmsRBfy61i59si0&language=de&fields=icon%2Cname%2Cpermanently_closed%2Cformatted_address%2Cvicinity%2Crating%2Creview%2Curl%2Cuser_ratings_total&key=AIzaSyB-zEVXy9fHODQ8eKwjywlOqiulbi84i&#8221);,“
   html_attributions”: [], “status”: “REQUEST_DENIED”
 * So I triple checked and copied the IP-Address and the Place ID.
 * After this I changed the Application Restriction in the Google API from IP to
   HTML-Website and reseved this arrow message (from the rating plugin): “error_message”:“
   API keys with referer restrictions cannot be used with this API.”,
    “html_attributions”:[],“
   status”: “REQUEST_DENIED”
 * So is there anything I did wrong?
 * Thanks, Jan
    -  This topic was modified 6 years, 2 months ago by [frepho](https://wordpress.org/support/users/frepho/).

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

 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-using-google-api/#post-12518449)
 * [@frepho](https://wordpress.org/support/users/frepho/) Thanks for being the _first_
   person to contact me about something to do with this new plugin!
 * Okay, there is a clue in the error code here. Please use the following IP for
   your Restrictions by IP:
 * `2a03:4000:30:8a40::13:5825`
 * The restriction is only for the web server’s IP and not the website’s URL. The
   URL will not work. The IPv6 mentioned here should be fine.
 * Once that is done, you can follow the other points in the [Visual Guide](https://designextreme.com/wordpress/google-api/).
 * I will reply promptly if you have any further questions here.
 * All the best,
 * Noah
    -  This reply was modified 6 years, 2 months ago by [Noah Hearle](https://wordpress.org/support/users/designextreme/).
      Reason: Clarification about restriction
 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-using-google-api/#post-12520585)
 * [@frepho](https://wordpress.org/support/users/frepho/) I am marking this as resolved
   for the moment. Please let me know if this continues to cause a problem for you
   and I’ll look into this further.
 *  Thread Starter [frepho](https://wordpress.org/support/users/frepho/)
 * (@frepho)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-using-google-api/#post-12520819)
 * Thank you for your feedback!
    Now it is working.
 * The Problem was indeed the IP Address. I did my previous attempts only with the
   IPv4 address, as described in the plug in. With IPv6 it works perfectly.
 *  Plugin Author [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-using-google-api/#post-12526467)
 * [@frepho](https://wordpress.org/support/users/frepho/) Thanks for letting me 
   know.
 * As a result of your query, I am improving the IP address detection in the next
   version of the plugin.
 * Enjoy!

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

The topic ‘Error using Google API’ is closed to new replies.

 * ![](https://ps.w.org/opening-hours/assets/icon.svg?rev=2706372)
 * [We’re Open!](https://wordpress.org/plugins/opening-hours/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/opening-hours/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/opening-hours/)
 * [Active Topics](https://wordpress.org/support/plugin/opening-hours/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/opening-hours/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/opening-hours/reviews/)

## Tags

 * [Google API](https://wordpress.org/support/topic-tag/google-api/)
 * [google api key](https://wordpress.org/support/topic-tag/google-api-key/)
 * [ip restriction](https://wordpress.org/support/topic-tag/ip-restriction/)
 * [place id](https://wordpress.org/support/topic-tag/place-id/)
 * [request denied](https://wordpress.org/support/topic-tag/request-denied/)

 * 4 replies
 * 2 participants
 * Last reply from: [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/error-using-google-api/#post-12526467)
 * Status: resolved