{"id":12517504,"date":"2020-03-06T19:28:30","date_gmt":"2020-03-06T19:28:30","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/error-using-google-api\/"},"modified":"2020-03-06T20:11:10","modified_gmt":"2020-03-06T20:11:10","slug":"error-using-google-api","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/error-using-google-api\/","title":{"rendered":"Error using Google API"},"content":{"rendered":"<p>Hey Noah, <\/p>\n<p>I just experienced a strange error.<br \/>\nI did the recommended set up for the Plug in with a new Project in the Google Developer\u2019s Console, then I stumbled across the error.<\/p>\n<p>At first with &#8220;We&#8217;re open&#8221; then I retested it with your Rating Plugin.<br \/>\nBoth of your Plug-ins show me the same Error message: &#8220;Error: Your Google API Key is not valid for this request and permission is denied. Please check your Google API Key.&#8221;<br \/>\nBut in the Google Developer\u2019s Console the new API Key shows multiple uses, but everytime it is reportet as a error in the Developer&#8217;s Console.<\/p>\n<p>The Rating Plugin shows this as retrieved data:<br \/>\n&#8220;error_message&#8221;: &#8220;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&amp;language=de&amp;fields=icon%2Cname%2Cpermanently_closed%2Cformatted_address%2Cvicinity%2Crating%2Creview%2Curl%2Cuser_ratings_total&amp;key=AIzaSyB-zEVXy9fHODQ8eKwjywlOqiulbi84i&#8221;,<br \/>\n    &#8220;html_attributions&#8221;: [],<br \/>\n    &#8220;status&#8221;: &#8220;REQUEST_DENIED&#8221;<\/p>\n<p>So I triple checked and copied the IP-Address and the Place ID.<\/p>\n<p>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): &#8220;error_message&#8221;: &#8220;API keys with referer restrictions cannot be used with this API.&#8221;,<br \/>\n    &#8220;html_attributions&#8221;: [],<br \/>\n    &#8220;status&#8221;: &#8220;REQUEST_DENIED&#8221;<\/p>\n<p>So is there anything I did wrong? <\/p>\n<p>Thanks, Jan<\/p>\n","protected":false},"template":"","class_list":["post-12517504","topic","type-topic","status-publish","hentry","topic-tag-google-api","topic-tag-google-api-key","topic-tag-ip-restriction","topic-tag-place-id","topic-tag-request-denied"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12517504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12517504\/revisions"}],"predecessor-version":[{"id":12517509,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12517504\/revisions\/12517509"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12517504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}