Réponse :
Array
(
[code] => 400
[message] => Bad Request
)
Corps de réponse :
{
"error": {
"code": 400,
"message": "API key expired. Please renew the API key.",
"errors": [
{
"message": "API key expired. Please renew the API key.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "translate.googleapis.com"
}
}
]
}
}
Réponse complète de wp_remote_get() :
Array
(
[headers] => WpOrg\Requests\Utility\CaseInsensitiveDictionary Object
(
[data:protected] => Array
(
[vary] => Array
(
[0] => Origin
[1] => X-Origin
[2] => Referer
)
[content-type] => application/json; charset=UTF-8
[content-encoding] => gzip
[date] => Sat, 20 Apr 2024 17:59:56 GMT
[server] => ESF
[cache-control] => private
[x-xss-protection] => 0
[x-frame-options] => SAMEORIGIN
[x-content-type-options] => nosniff
[alt-svc] => h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
)
)
[body] => {
"error": {
"code": 400,
"message": "API key expired. Please renew the API key.",
"errors": [
{
"message": "API key expired. Please renew the API key.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "translate.googleapis.com"
}
}
]
}
}
[response] => Array
(
[code] => 400
[message] => Bad Request
)
[cookies] => Array
(
)
[filename] =>
[http_response] => WP_HTTP_Requests_Response Object
(
[response:protected] => WpOrg\Requests\Response Object
(
[body] => {
"error": {
"code": 400,
"message": "API key expired. Please renew the API key.",
"errors": [
{
"message": "API key expired. Please renew the API key.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "translate.googleapis.com"
}
}
]
}
}
[raw] => HTTP/1.1 400 Bad Request
Vary: Origin
Vary: X-Origin
Vary: Referer
Content-Type: application/json; charset=UTF-8
Content-Encoding: gzip
Date: Sat, 20 Apr 2024 17:59:56 GMT
Server: ESF
Cache-Control: private
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Connection: close
Transfer-Encoding: chunked
{
"error": {
"code": 400,
"message": "API key expired. Please renew the API key.",
"errors": [
{
"message": "API key expired. Please renew the API key.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "translate.googleapis.com"
}
}
]
}
}
[headers] => WpOrg\Requests\Response\Headers Object
(
[data:protected] => Array
(
[vary] => Array
(
[0] => Origin
[1] => X-Origin
[2] => Referer
)
[content-type] => Array
(
[0] => application/json; charset=UTF-8
)
[content-encoding] => Array
(
[0] => gzip
)
[date] => Array
(
[0] => Sat, 20 Apr 2024 17:59:56 GMT
)
[server] => Array
(
[0] => ESF
)
[cache-control] => Array
(
[0] => private
)
[x-xss-protection] => Array
(
[0] => 0
)
[x-frame-options] => Array
(
[0] => SAMEORIGIN
)
[x-content-type-options] => Array
(
[0] => nosniff
)
[alt-svc] => Array
(
[0] => h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
)
)
)
[status_code] => 400
[protocol_version] => 1.1
[success] =>
[redirects] => 0
[url] => https://translation.googleapis.com/language/translate/v2
[history] => Array
(
)
[cookies] => WpOrg\Requests\Cookie\Jar Object
(
[cookies:protected] => Array
(
)
)
)
[filename:protected] =>
[data] =>
[headers] =>
[status] =>
)
)
]]>See this doc for retrieving your API key: https://lpacwp.com/docs/getting-started/google-cloud-console/getting-your-google-maps-api-key/
]]>I’ve seen more people have the same problem as me But I don’t find a solution. I am trying for two hrs now to get the plugin running. No chance: Your Google API Key is not valid for this request and permission is denied.
API is set and restricted to the IP stated in the setup.
Places API is set.
Billing is enabled.
Places API is enabled.
But still Retrieved data says: This IP, site or mobile application is not authorized to use this API key.
I use this plugin on two other websites and that works.
What can that be?
Thanks!
Dirk
]]>First of all. I really like the plugin. It works well in my opinion.
Here is my website’s page using your plugin: (moved below post)
Secondly, I have a few questions:
1 I’ve got 5 reviews on Google. But it said “3 reviews” even though all 5 reviews were shown up. Check the images below. I cleaned cache already.
https://ibb.co/QD3B3H3
https://ibb.co/SKYQhBf
2 I used the Advanced function to load all Google Reviews.
https://ibb.co/bFdcTjs
I followed your instruction carefully. But when I pasted the Outer HTML div to the textarea in step 5, then I couldn’t save it or process it. There was no “Save” button.
https://ibb.co/bb50kw9
I clicked “Process” button, but it just showed “No new reviews found” and a “Clear” Button.
https://ibb.co/MC87XPP
When I click the “Clear” button, it sent me back to the Advanced tab page. The textarea in step was still not fulfilled.
https://ibb.co/4sNBjGv
3 It seems like the new reviews won’t be updated automatically. I had to clear all caches before the new reviews appeared on the website’s page.
4 There is a conflict between your plugin’s setting with the regular Google Maps module. I am using Divi and its Fullwidth Google Maps’s Module.
When I setup your plugin, it asked me to do these steps:
”
6 Click “Restrict Key”;
7 Set “Application restrictions” to “IP addresses” and enter:?67.227.214.16?;
8 Select “API restrictions” to “Restrict key” and select the following API request: “Place API”;
”
But if I do those steps, the Google Maps Module won’t work anymore. “The page didn’t load Google Maps correctly …”
Check this link: https://ibb.co/YXFcGst
Then I checked for the Error. That was this Error: ReferrerNotAllowedMapError.
Then I followed the instruction to fix the issue like below:
https://ibb.co/QNkZDhJ
But if I fix this Error, your plugin won’t work anymore.
Then if I apply your way of API restriction again, your plugin would work again, but the Google Maps Module on Divi stops working.
I hope you can help me solve those.
BR,
Kien
]]>PLEASE CHECK https://prnt.sc/tnmo74
API https://prnt.sc/tnmoi1
I await your prompt reply
Regards
]]>Remaining question is: Would it be an improvement to have the
choice of using an “API-key-free” maps-snippet for events?
Jens
—- original post: —-
Hello to all of you “The Events Calendar”-developers!
First Thanks for sharing your famous calendar-plugin for free
in a very usable version!
For us, as coping only with charitable organizations it’s generally
always difficult to get money for our web-projects.
Many of our coworkers are only paid a little compensation of their
travel expenses getting to the office.
Their work in general is mostly voluntarily — and thus unpaid!
Additionally expenses for “non-hardware” are nearly impossible
to budget, if there are any way to get a “free” alternative.
So I want to say Thank You again for the possibility of using your
free plugin version and supporting charitable groups and
organizations – may be in a way you’re normally not aware of? ;(
—
My proposal is related to the map section of your events:
As I had to realize google had changed their supply of API-keys
generally.
Getting them has (especially for non English users) becoming
rather confusing, as they obviously try to monetize each and every
use of their maps-snippets on every website, I think.
Additional their related pages are not translated for foreign users,
so it looks intransparent — or better said inscrutable — how much
you will have to pay for using their API-keys on your website.
Thus — for our projects — using new API-keys from google
has become a NO GO !
:-((
—
So I looked for a formerly used alternative, where we used
google-maps-snippets without using any API-key.
It looks as if they’e still working:
https://maps-generator.com/
I’m aware that this way you only will have the isolated Map-snippet
on your website, only showing the exact location of your highlighted
place.
But this will work for most posts, I think. It’s a far better look
as if you have to disable the map-snippet generally — because of
lacking an API-key for your actual project.
My final question:
Would it be possible to implement this “alternative google maps”-
snippets in your “The Events Calendar”-plugin?
(as a new and second choice, I would suggest)
Kind Regards
& best wishes continuing with your awesome work
Jens
from Freistatt, Lower Saxony, Germany
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”,
“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
]]>I’m getting this error too – Error: Your Google API Key is not valid for this request and permission is denied. Please check your Google API Key.
I have the correct IP address entered for restrictions, have followed all the steps. It did actually work for a few days but then I noticed it wasn’t displaying any reviews and attempted to make it work again.
Thanks
]]>I’m getting the following error:
– Something is wrong with this Google API Key. Error from Google…
Array ( [error_message] => You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started [predictions] => Array ( ) [status] => REQUEST_DENIED )
I have already set a billing account to the API project within GCP and also already ran a test with the below link with the status ‘OK’.
https://maps.googleapis.com/maps/api/place/details/json?placeid=YOUR_PLACE_ID&key=YOUR_API_KEY
I have also already deactivated and then reactivated the plugin and have already tried everything else that I could find or think of.
Could you help please?
Thanks,
Ashish