# Retrieving information from Google Maps API (Getting Error)

**URL:** <https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886>\
**Category:** Need help\
**Created:** [January 10, 2025, 5:31pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886 "2025-01-10T17:31:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayborders](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jayborders](https://forum.bubble.io/u/jayborders)\
**Post date:** [January 10, 2025, 5:31pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/1 "2025-01-10T17:31:39Z")

</div>

Let me apologize for the length of this message beforehand but I wanted to add detail and images to thoroughly explain my problem. Any help anyone can lend would be greatly appreciated.

Long story short I’m getting the following error: {“error\_message”:“API keys with referer restrictions cannot be used with this API.”,“html\_attributions”:,“status”:“REQUEST\_DENIED”}

Below are details.  
…  
I previously had a feature in a an app I’m building to be able to get business information using the Google Maps plugin. I would retrieve the Google Place ID from a business using the Google Places Plugin. I would save that ID in a field and when one of my app users wanted information on that business such as business hours. The app was displaying it in a text repeating group (see example)

 ![google retrieve business hours](https://us1.discourse-cdn.com/bubble/original/3X/7/6/76d46fdd0f21966f9d0f78d7ca5537a99f53b529.png)

The problem is that it is not working now. Can anyone confirm that the following is correct?

1. I created Google Client/Server keys and put them in the places as shown …  

2. I’m using the Google Maps Extended API.

3. Once I get the Google Place ID from my Google Places plugin call, I do the following to get information such as business hours as seen …  

These are the steps I am following but that call I make in step 3 is coming back empty according to debug:

 ![debug business hours 1](https://us1.discourse-cdn.com/bubble/original/3X/6/3/63d8f3989c6f5bb34ea84a282e4af3e93e04a66b.png)  
 ![debug business hours 2](https://us1.discourse-cdn.com/bubble/original/3X/f/2/f236045c58ba25e97a2d55989f8e6889e052f792.png)  
 ![debug business hours 3](https://us1.discourse-cdn.com/bubble/original/3X/5/1/511d746860eee4b3347339a1d4f4569a9f35a8dc.png)

In the debug message, I get the following error:  
{“error\_message”:“API keys with referer restrictions cannot be used with this API.”,“html\_attributions”:,“status”:“REQUEST\_DENIED”}

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 10, 2025, 5:36pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/2 "2025-01-10T17:36:30Z")

</div>

Did you take time to search forum about this error?..

---

<div class="post-metadata">

**Author:** ![jayborders](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jayborders](https://forum.bubble.io/u/jayborders)\
**Post date:** [January 10, 2025, 5:41pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/3 "2025-01-10T17:41:21Z")

</div>

Hi Jici,

I did. I did a general browser search as well. I see where others have encountered this error, but I’m struggling to see what the resolution was. Do you have a link you can point me to?

Thanks

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 10, 2025, 5:46pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/4 "2025-01-10T17:46:40Z")

</div>

> [@Still the same? Google MAP error: “API keys with referer restrictions cannot be used with this API](https://forum.bubble.io/t/still-the-same-google-map-error-api-keys-with-referer-restrictions-cannot-be-used-with-this-api/254698):
>
> Hey I’m getting the error: API keys with referer restrictions cannot be used with this API, when using geolocation. I removed restrictions and it works fine. I read in an old thread that said the only solution is to remove restrictions. Is this still the case? The old thread is below. [How do resolve the Google MAP error: “API keys with referer restrictions cannot be used with this API.”?](http://forum.bubble.io/t/how-do-resolve-the-google-map-error-api-keys-with-referer-restrictions-cannot-be-used-with-this-api/48846)

> [@How do resolve the Google MAP error: “API keys with referer restrictions cannot be used with this API.”?](https://forum.bubble.io/t/how-do-resolve-the-google-map-error-api-keys-with-referer-restrictions-cannot-be-used-with-this-api/48846):
>
> Hello, I’m developing an App with Bubble and while I have an API Key for Google Map and 0Auth (works pretty fine when I use to display GEO Locations on pages and Map ) I’m facing an issue to record a GEOLOCATION into a database field within a Workflow. Every time the workflow try to record in a GEOLOCATION field the GEOLOCATIOn, I have an error and this message : “ Error hitting Google Geocode API: API keys with referer restrictions cannot be used with this API. ” Any idea about the solution?…

> [@Error hitting Google Geocode API: API keys with referer restrictions cannot be used with this API](https://forum.bubble.io/t/error-hitting-google-geocode-api-api-keys-with-referer-restrictions-cannot-be-used-with-this-api/354782):
>
> Hi guys, I’ve my client setup the geocode and maps api keys for adding geographic location as input for users in his app. However, we’re constantly facing this error and not sure why this is coming up everytime. Can anyone help with this? We tried all different possible combinations…nothing worked! “Error hitting Google Geocode API: API keys with referer restrictions cannot be used with this API.”

> [@Workflow error - Error hitting Google Geocode API: API keys with referer restrictions cannot be used with this API](https://forum.bubble.io/t/workflow-error-error-hitting-google-geocode-api-api-keys-with-referer-restrictions-cannot-be-used-with-this-api/221946/19):
>
> Hi @Jici @mikeloc I reported a bug to Bubble and received the following reply. Saying… We are sending this email to let you know that your application Koreafy is being rate-limited because of a high number of Google Map loads. This means that some users will be unable to see the map elements on your pages. You should add your own Google Map API key in the [Editor](https://bubble.io/page?id=koreafy&tab=tabs-6) to remove this limitation to avoid issues and for a better user experience (see [this](https://manual.bubble.io/help-guides/working-with-data/working-with-location-data) to generate a free Google key). I have set up…

In short, You need to check in Google Cloud Console for any restrictions for the keys you are using. Remove them and test. This can take a moment to be live, but normally, it’s fast.

---

<div class="post-metadata">

**Author:** ![jayborders](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jayborders](https://forum.bubble.io/u/jayborders)\
**Post date:** [January 10, 2025, 6:42pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/5 "2025-01-10T18:42:39Z")

</div>

@Jici Thank you! This worked. Asking as a novice, are there any security or privacy issues I should be cautious of with restrictions being removed. It’s confusing that bubble says to implement these restrictions with no warning that it will cause issues with actually using the API.

Thanks again

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 10, 2025, 7:00pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/6 "2025-01-10T19:00:50Z")

</div>

Did you follow this?

> **[How to Setup Google API Keys Bubble Video Course](https://bubble.io/video/how-to-setup-google-api-keys)**
>
> In this Bubble tutorial we learn how to setup Google API Keys to access Maps and Geolocation features

Because you will see that there’s a different key used for maps VS geocode (server)  
Domain restriction is only for maps key

---

<div class="post-metadata">

**Author:** ![jayborders](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jayborders](https://forum.bubble.io/u/jayborders)\
**Post date:** [January 10, 2025, 7:53pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/7 "2025-01-10T19:53:51Z")

</div>

Yes that’s the video that I followed. It’s the restriction on the client key that it says to implement (time 2:16). So unless I’m mistaken, it’s by following this video that got me into this problem.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 10, 2025, 7:59pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/8 "2025-01-10T19:59:52Z")

</div>

Try to report this to support if you think you have set everything correctly for both client and server keys

---

<div class="post-metadata">

**Author:** ![jayborders](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jayborders](https://forum.bubble.io/u/jayborders)\
**Post date:** [January 11, 2025, 5:17am UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/9 "2025-01-11T05:17:52Z")

</div>

This is where the issue is. If I set Application restrictions to none it works. If I go by the video and set restrictions to allow my bubble website to use the API, it fails. Am I missing something?

 ![Client-key-setup](https://us1.discourse-cdn.com/bubble/original/3X/9/2/92f6916e66877ad313b1a2ab9c7573fb87b9323c.png)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [January 11, 2025, 5:22am UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/10 "2025-01-11T05:22:58Z")

</div>

Can you share both api keys settings and bubble settings for API too? (You can hide api keys and just keep a little part visible so we can compare with what you have set in Bubble settings)

---

<div class="post-metadata">

**Author:** ![jayborders](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jayborders](https://forum.bubble.io/u/jayborders)\
**Post date:** [January 11, 2025, 7:49pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/11 "2025-01-11T19:49:07Z")

</div>

Here are the settings:

The server settings are fine and don’t seem to present an issue -

 ![google-server-key-settings](https://us1.discourse-cdn.com/bubble/original/3X/1/0/10e472d88edc444aa838f86379c38cde37316528.png)  
 ![google-server-key-settings-2](https://us1.discourse-cdn.com/bubble/original/3X/0/9/091f1aa52e33bc850b7d9424447020cf7e38558f.png)  
Server key  
 ![google-server-key](https://us1.discourse-cdn.com/bubble/original/3X/2/d/2d5f6a32882a22ef7ce5e1cf7f558283c12568af.png)

The client settings (works vs. doesn’t work)  
Works:

 ![google-client-key-settings-unrestricted](https://us1.discourse-cdn.com/bubble/original/3X/7/b/7b4c58b4b3125e1b60397d018e93c00f3cbd409a.png)

Doesn’t Work:

 ![google-client-key-settings-restricted](https://us1.discourse-cdn.com/bubble/original/3X/c/d/cddac7e811f5f2e8d896f1fd95bfe4fbba8006a4.png)

Client Key:

 ![google-cleint-key](https://us1.discourse-cdn.com/bubble/original/3X/d/9/d905c85b0c15f0c64acc8cf0c2a89b3e638b9f07.png)

From Bubble settings:

 ![bubble-api-setting](https://us1.discourse-cdn.com/bubble/original/3X/3/3/337840f1951d61ea14fdef20c3ce8f12b39854a3.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [March 21, 2025, 5:32pm UTC](https://forum.bubble.io/t/retrieving-information-from-google-maps-api-getting-error/354886/12 "2025-03-21T17:32:18Z")

</div>

Closed on March 21, 2025, 5:32pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
