【发布时间】:2013-06-22 20:37:23
【问题描述】:
我有一个市场应用程序,我想用它来访问 Google Drive API。我目前正在使用 2-legged OAuth 的 gdata API。我的理解是新的 Google API,包括 Google Drive API 不支持 2-legged OAuth。
如何在不向每个客户的用户单独征求许可的情况下访问客户域的 Google Drive API?
在我的 Google Apps Marketplace 供应商页面上,有一个指向 Google API 控制台的链接,其中有一个项目链接到我的 Marketplace 应用程序,但没有创建 OAuth 2.0 客户端 ID 的选项。我只能创建一个简单的 API 密钥。
显然,您过去可以使用两腿 OAuth 凭据以及服务器 api 密钥进行身份验证,但现在情况似乎不再如此。我尝试使用这种方法与旧的 Google API .net sdk 进行身份验证,但得到了 401。我下载了最新的 sdk,完全没有两足 OAuth。我查看了 Ruby sdk 的副本,因为它在视频“Google Drive SDK: Using the Drive API with the Google Apps Marketplace”中使用过,但看起来(我不知道 Ruby)它明确禁止了两条腿 OAuth:
case authorization
when :oauth_1
STDERR.puts('OAuth 1 is deprecated. Please reauthorize with OAuth 2.')
我觉得 Google 故意忽略了我关于这个主题的问题。
【问题讨论】:
标签: google-api google-drive-api