Google Places API Photography Error: 403 Forbidden

I am trying to access photos of places using a photo relay.

It works:

https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=CnRsAAAAGrxlcgShBlZZJgAFxr19eT3fQKxeDTpN4HtyCIsUpOHjUPqB_tm_J_Rf9sbwyWU1j4_SSRWyFiIT0TYGDSn6mAwAQ6ep-9Rok0kAEf6LewL8CRYbaEVoEsfrZXs_BIwUcqNs5p1TQv-EMt-PO8RloBIQHF40AvYJVknRixv4uFYVVRoUGKN_fqy7qynsrclqkBbAdaIpi58&key=MY_KEY

But this is not:

https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=CnRnAAAADBlPZditZugHCXmMtb0_qQqwyh3rJ0ByTxnI_MRXXEB7Cj_I1QgTKi7XMUAXbD3YMEH8yPdfIH-u-uoM0ZnMsLY6l0eF0Ip9JTkqkw5tgE_eD6RUhgOztHJ312JRWIFkJq2faixmtTM4DILp4WsWaRIQQy53oVWAfP68T60TsYQSNxoUZDjyv0kLie1ZGNzDrF2YgqqktWo&key=MY_KEY

Both photo data are valid. I can get about 50% of the photos, the remaining 50% give me a 403 error. I have a paid license key and I did not exceed the limit (in any case, this is not that the first 50% work, and then it gives 403, but quite random, some work and some not).

Any ideas?

+4
source share
2 answers

The photo seems to have been deleted (or made private) by its owner.

Your request for 2nd place ( link ) returns a redirect:

HTTP/1.1 302 : https://lh5.googleusercontent.com/-gMRov-DClsg/UkYcLUa5mtI/AAAAAAAAJiI/48Zbe7GvS9I/s1600-w800/photo.jpg

.jpg URL- HTTP 404 .

+1

php-: file_get_contents

0

All Articles