Read content of public shared file in Google Drive

后端 未结 2 1265
情话喂你
情话喂你 2020-12-17 02:40

I am working on a Google Drive application.

The application needs to read the contents of a publically shared file in someone\'s Google Drive.

How can I do t

相关标签:
2条回答
  • 2020-12-17 03:25

    While webContentLink does provide link to download or view the content in a browser, it appears to me that it still requires authentication or that the user is already logged in to view the file, even if it is shared as "public"

    I hope the plan is to make this work as described above, that public files can be viewed without any authentication whatsoever.

    0 讨论(0)
  • 2020-12-17 03:33

    When using the Google Drive API, after setting the ACL of the file to be public you can directly access the file using the webContentLink attribute of the file metadata which should not require any authentication/authorization when the file is public.

    This is a feil metadata example: https://developers.google.com/drive/v2/reference/files#resource

    This is how to get the file metadata using common client libraries: https://developers.google.com/drive/v2/reference/files/get

    0 讨论(0)
提交回复
热议问题