【发布时间】:2020-06-02 16:00:14
【问题描述】:
我们有一个 Google Drive Oauth2 应用集成。我们正在使用 Google Drive API 导出和获取端点,以便从客户的 Google Drive 文件夹中读取数据。 我们的应用由 Google Oauth 验证团队发布,但我们无法读取不是(csv、xls、xlsx)Google Docs 文件的文件。
这是一个 API 请求示例: 网址:
"https://www.googleapis.com/drive/v3/files/1874uz4MTNer4IszgWG_3pH6VEH2AWJPd?alt=media&access_token=ACCESS_TOKEN"
回复:
"<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/><title>Sorry...</title><style> body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }</style></head><body><div><table><tr><td><b><font face=sans-serif size=10><font color=#4285f4>G</font><font color=#ea4335>o</font><font color=#fbbc05>o</font><font color=#4285f4>g</font><font color=#34a853>l</font><font color=#ea4335>e</font></font></b></td><td style=\"text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%\"><div style=\"border-bottom: 1px solid #dfdfdf;\">Sorry...</div></td></tr></table></div><div style=\"margin-left: 4em;\"><h1>We're sorry...</h1><p>... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.</p></div><div style=\"margin-left: 4em;\">See <a href=\"https://support.google.com/websearch/answer/86640\">Google Help</a> for more information.<br/><br/></div><div style=\"text-align: center; border-top: 1px solid #dfdfdf;\"><a href=\"https://www.google.com\">Google Home</a></div></body></html>"
在 2020 年 2 月 7 日之前,此类请求都可以正常工作。
使用导出 Google Doc 文件的导出端点,工作正常。
在第一时间,我们发现这个链接描述了一些变化:https://support.google.com/cloud/answer/9110914 我们申请了 Oauth 验证,我们通过了,但我们仍然看到同样的问题,即使我们重做 Oauth2 身份验证流程,生成新的访问/刷新令牌。 我们已经尝试在 Issue Tracker 和 Oauth Team 上就此事与 Google 联系,但都无济于事。 我们在生产服务器上没有任何类型的恶意软件、VPN 或任何我们可以在一些相关问题中找到的东西。
有人对如何解决这个问题有任何建议吗?
谢谢。
【问题讨论】: