Google云端硬盘API是否允许我们无需身份验证即可下载公共文件? [英] Does Google Drive API Allow us to download public file without authentication?

查看:109
本文介绍了Google云端硬盘API是否允许我们无需身份验证即可下载公共文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我是否可以使用未经身份验证的API从Google云端硬盘下载公共文件?可能可以,因为任何文件都可以下载而无需身份验证.但是Google云端硬盘API文档会说以下内容;

I wonder that can I download public file from Google Drive using API without authentication? Probably I can, since any file can be downloaded if I see it without authentication. But Google Drive API Docs say the following;

您的应用程序发送到Drive API的每个请求必须包含一个授权令牌.

例如,我可以显示以下公共文件,而我正试图获取它.也许,我什至不需要使用Google Drive API.顺便说一下,我正在使用JAVA.

For instance, I can show the following public file and I'm trying to get it. Maybe, I dont even need to use Google Drive API. By the way, I'm using JAVA.

https://drive.google.com/file/d/0B1dXCaVmaqzROHNwdC1SQmdxejQ/view?usp = sharing

有什么建议我该怎么办?

What can I do, any suggestion?

推荐答案

您不需要身份验证即可读取公共文件.下载文件的网址非常简单: https://www.googleapis.com/drive/v3/files/<FILE_ID>?key=<YOUR_API_KEY>&alt=media .

You don't need authentication to read public files. The URL to the file download is as easy as this: https://www.googleapis.com/drive/v3/files/<FILE_ID>?key=<YOUR_API_KEY>&alt=media.

这篇关于Google云端硬盘API是否允许我们无需身份验证即可下载公共文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆