Google places photo


Does anyone know how to pull google places photos?

Coincidentally I am working on exactly that at the moment.

Struggling a little at the moment with the PlaceId.

Will keep you posted.

Thanks, please let me know how you go.

Did you manage to get this working?

Yes… and No !

So, I can get the call to work fine. But Places returns a photo not JSON, and Bubble can’t handle it right now.

George emailed me last night about it. But it is at least a learning step, so will investigate !

Yes !!!

So what you do is point the Bubble image source at the Google Photo Image API.

1 Like

Thanks so much. Do you have a working app I can look at and see how you do it at the backend?


1 Like

@NigelG, thanks very much for this example. I tried and it seems I’m almost there. I got on a 403 problem. Did you get it also?

On Place Photos  |  Places API  |  Google for Developers it says it is related to the quota… but my app on Google is paid and I just started.

Funny thing… when I inspect on debug the picture appears there (does Bubble debugger get it in a different way @emmanuel?)

I’ve been searching and it could also be related to the restriction of IP address on API but I let mine with no restrictions. Did you have this problem Nigel?

For your app example I get a mix:

EDIT: if I copy and paste the entire code with key, the browser shows the picture. It only shows the Forbidden icon if I remove the key parameter. But on the repeating group the key parameter is present.

Yes, you are right. It is all a bit odd. Will have an investigate as well.

thanks. I’ll be also trying to fix and if I have any positive news I’ll write back here again.

Hi @NigelG how do you actually do this, how do you point the image source at the Google API? Any info would be so helpful! Thank you

Hi there.

You “just” put it into the Bubble image URL.

Hey @NigelG,
I struggled with getting the image and finally figured it out today, thanks a lot to your other posts on the same topic.

Current question:
I’m using the dynamic image and in testing I put in the API key in the URL as mentioned in Places API docs, but the API key needs to be added in the URL? Couldn’t someone using the app extract this API key? Is there a workaround like another secret key that could be used in place of the API key itself?

@NigelG I doubt that this works.

I created a new API key named Image URL request, then set an application restriction on the website (https://websitename/*.
Then in Restrictions, restricted the key to be used only with Places API.

I get the following error in bubble when I use this API key: Error connecting to Google Places: REQUEST_DENIED - API keys with referer restrictions cannot be used with this API.

Was there any mistake here?