无需使用OAuth2访问Google云端硬盘 [英] Access Google Drive without OAuth2

查看:138
本文介绍了无需使用OAuth2访问Google云端硬盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在搜索GoogleDrive SDK和Drive API上的所有Google文档,但我无法确定是否有办法连接到特定的GoogleDrive,而无需使用OAuth2。



我意识到OAuth2允许服务器或客户端能够安全地连接到相关的Google Drive。但是,我想知道是否有一种方法可以简单地为Google Drive实例提供一个API密钥,并通过它访问我的文件和文件夹。实际上,我有办法通过OAuth2连接到用户的Google云端硬盘,但我只想以这种方式连接到我的云端,以自动将统计数据推送到我自己的Google云端硬盘上的表单。由于它是自动的,我不想填写凭证表单并单击接受,所有这些我当然会意识到,之后我就可以拥有一个刷新令牌。但是我真的想避免所有可能的情况。



这与Mashery允许的大部分API以及Twilio类似。只有API密钥,然后你可以访问。



我真的只需要知道这是否可能,所以我可以继续追求或如果有一种方法可以连接到特定的GoogleDrive,而无需使用特定的GoogleDrive,那么您可以尝试一些不同的方法。

使用OAuth2。



没有。 Oauth2仅支持授权/认证机制。



如果您的问题确实存在如果有连接到特定GoogleDrive无需编写OAuth2代码。,那么这个答案可能有助于如何在没有用户干预的情况下授权应用程序(Web或安装)? (canonical?)



只有API密钥,然后才能访问。听起来有点像Google服务帐户,但会为应用创建一个虚拟云端硬盘帐户,而不是让应用访问您的常规云端硬盘帐户。


I have been rummaging through all the Google documentation on GoogleDrive SDK and the Drive API, however I cannot find out if there is a way to connect to a particular GoogleDrive without having to use OAuth2.

I realize that OAuth2 allows for the server or client to be able to connect securely to the particular Google Drive in question. However, I want to know if there is a way to simply have an API Key for the Google Drive instance and simply through that, access my files and folders. In fact I have a way to connect to the user's Google Drive already with OAuth2, but I want to only connect to mine in this way in order to automate pushing off statistical data to forms on my own Google Drive. Since it's automated I don't want to have to fill in the credential form and click "Accept" and all that, of course I realize that after that I'd be able to have a refresh token. But I really want to avoid all that if possible.

This is similar functionality to much of the APIs that Mashery allows, as well as Twilio. Only the API Key and then you can have access.

I really just need to know if this is at all possible or not, so I can either continue with the pursuit or leave it and try something different.

解决方案

"if there is a way to connect to a particular GoogleDrive without having to use OAuth2."

No. Oauth2 is the only authorization/authentication mechanism supported.

If you're question is really "if there is a way to connect to a particular GoogleDrive without having to write OAuth2 code.", then this answer might help How do I authorise an app (web or installed) without user intervention? (canonical ?)

The "Only the API Key and then you can have access." sounds a bit like a Google Service Account, but that would create a pseudo Drive account for the app, rather than allow the app to access your regular Drive account.

这篇关于无需使用OAuth2访问Google云端硬盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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