Cannot connect API
-
{
“error_message”: “This API project is not authorized to use this API.”,
“html_attributions”: [],
“status”: “REQUEST_DENIED”
}
-
@amberjader Thanks for sending the Retrieved Data. It looks likes either the IP address restriction is not set or incorrect, or more likely, the restriction for the API is incorrect. Please ensure that you have “Places API” enabled and selected in to API Key Restrictions (it’s at the bottom of this page).
Sorry, I am not very familiar with this.
Thank you for your quick reply.Do I add a ‘key restriction’?
Application restrictions
An application restriction controls which websites, IP addresses or applications can use your API key. You can set one application restriction per key.None
HTTP referrers (websites)
IP addresses (web servers, cron jobs, etc.)
Android apps
iOS appsAPI restrictions
API restrictions specify the enabled APIs that this key can callDon’t restrict key
This key can call any API
Restrict key
Note: It may take up to 5 minutes for settings to take effect.Currently, I have no restrictions but google doesn’t really like this – they put a warning on it.
If you could point me to the correct setting I would be most grateful.
@amberjader That’s ok, I made a visual guide if this helps:
https://designextreme.com/wordpress/google-api/
It seems you found the right page there. You’ll need to select “IP Addresses” and select the API Key: “Places API” from the list.
If you’re new to Google Cloud, you’ll probably need to enable “Places API” from the Library to see it appear in the last list there.
-
This reply was modified 5 years, 4 months ago by
Noah Hearle. Reason: Last paragraph
Ah great!
I enabled Places API
I restricted using this as shown.I put IP address. Do I use my own computers IP here?
@amberjader That’s good!
For the IP Addresses, you’ll only need the IPv4 or IPv6 IP address of the web server you’re using. That’s all. It will tell you in the plugin’s Welcome or Setup tab.
{
“error_message”: “This IP, site or mobile application is not authorized to use this API key. Request received from IP address 209.182.197.181, with referee:URL
“,
“html_attributions”: [],
“status”: “REQUEST_DENIED”
}-
This reply was modified 5 years, 4 months ago by
amberjader.
@amberjader Please don’t copy your API Key to a public forum. Please remove the URL here. Thanks.
I really appreciate you getting me this far, it is wonderful.
Maybe I need to wait for it to configure itself
@amberjader Just to confirm what you need to restrict in the API Key:
- Under IP Addresses, please ensure that you have: 209.182.197.181
- Under APIs, please ensure that you have: Places API
Save it and check that the API Key still matches the one in the restriction page or Credentials list.
Oh amazing thank you so much!
@amberjader Great! I presume it’s all working ok for you now? 🙂
Yes perfect thank you
Hi, I followed the instructions but got the following message:
{
“error_message”: “This API project is not authorized to use this API.”,
“html_attributions”: [],
“status”: “REQUEST_DENIED”
}The only thing I couldn’t do was to choose API Places from the only available options shown:
BigQuery API
BigQuery Storage API
Cloud Datastore API
Cloud Debugger API
Cloud Logging API
Cloud Monitoring API
Cloud SQL
Cloud Storage
Cloud Trace API
Google Cloud APIs
Google Cloud Storage JSON API
Service Management API
Service Usage APIHave Google changed anything?
Update. I found out why the Maps API was missing, I needed to activate the API. However, after activating and selecting Maps API, it still didn’t work. I think the problem is with the Google Place ID. As the business covers a whole area, it is not listed with a specific address on Google Local. Although I have been using the place ID of the town, this still didn’t help although the Pluging is operating now.
Is there a workaround for this?
@bpsimms You need the Places API enabled. The Places API only returns data for specific locations as detailed in the plugin’s requirements.
-
This reply was modified 5 years, 4 months ago by
The topic ‘Cannot connect API’ is closed to new replies.