I'm using Google Cloud Storage for media. My website is stored elsewhere. I just want to display an image on my website without make this image public. I tried to display this image like this:
- create API key for browser limited to my website (API key for http://*.example.com)
- display image on this website
<img src="https://www.googleapis.com/storage/v1/b/MY_BUKET/o/MY_MEDIA.jpg?key=MY_KEY" />
- I can see in chrome console : ... "code": 401, "message": "Login Required" ...
I don't understand what I've missed, if I read the doc from google I'm lost: I just want to display an image with low security (but not public), not manage my media from my PHP app.
I can use google-api-php-client (my website is in PHP), but I don't know if I have something to do with this to make it work. I don't know where to start...
Thanks ! (I hope it's clear enough)
EDIT: I did not found any simple code example to render a private media in HTML using google-api-php-client; I'm lost