Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Storage Asking For Login While Downloading Public File

I upload image in bucket of Google Cloud Storage via external API. I also assigned all access rights. I shared file download link with my friends which is similar to

https://storage.cloud.google.com/buketName/fileName.extension

But the problem is that sometimes it asks for Google authentication login and sometimes not.

Bucket files permission is given to all users, still sometimes it ask for login. Don't know why?

like image 530
Amit Chauhan Avatar asked May 16 '18 07:05

Amit Chauhan


People also ask

How do I authenticate with Google Cloud Storage?

API authenticationIn the OAuth 2.0 Playground, click Cloud Storage API v1, and then select an access level for your application ( full_control , read_only , or read_write ). Click Authorize APIs. Sign in to your Google account when prompted. In the dialogue that appears, click Allow.

How do I access Google public data?

Sign in to your Google Admin console. Sign in using your administrator account (does not end in @gmail.com). Additional Google services. Click Google Public Data.


1 Answers

To reach public files without being logged in Google account you should use a link like this:

https://storage.googleapis.com/[BUCKET_NAME]/[FILE_NAME]

In order to reach files with link that you provided, even if they are public, you have to be signed in with your Google account.

like image 117
komarkovich Avatar answered Oct 20 '22 13:10

komarkovich