Nodejs-storage: Downloading the file from metadata

Created on 17 Feb 2020  路  3Comments  路  Source: googleapis/nodejs-storage

According to google documentation: https://cloud.google.com/storage/docs/json_api/v1/objects

When you list the object there's a mediaLink to provide the requester with a download link. The problem is that when I try to download it, says: "Anonymous caller does not have storage.objects.get access".

I suppose I have to send an access token somehow to get authentication. How do I do that?

storage question

All 3 comments

@abutreca you can generate download link for file using getSignedUrl please refer this sample for same.

@abutreca you can generate download link for file using getSignedUrl please refer this sample for same.

Thats a solution, but mediaLinks cant be used for the same result?

You can do using OAuth 2.0, Please refer this question and OAuth 2.0.

Was this page helpful?
0 / 5 - 0 ratings