【问题标题】:invalid_grant Returned using Service Account and Google Drive APIinvalid_grant 使用服务帐户和 Google Drive API 返回
【发布时间】:2013-02-21 18:37:23
【问题描述】:

我花了 2 天时间在使用服务帐户处理各种 Drive API 教程。

我最近使用的教程是这个:https://developers.google.com/drive/delegation

我在尝试上传文件时不断收到此错误:

ProtocolException was unhandled
Error occurred while sending a direct message or getting the response.

我安装了Fiddler 并确定当POST /o/oauth2/token 返回时:

{
    "error:"invalid_grant"
}

我已经三次检查了我的申请范围。

我做错了什么?

【问题讨论】:

    标签: c# asp.net google-drive-api


    【解决方案1】:

    原来我的服务器上的时间快了 5 分钟。

    当我更正服务器上的时间时,一切正常。

    我相信这会导致某种身份验证问题,因为 Google 服务器时间不接受来自我的服务器的请求的时间戳或类似的东西...

    (希望这可以节省一些人头疼)

    【讨论】:

    • 我的服务器只关闭了大约一分钟,它就抛出了这些错误。我安装了一个 NTP 服务,现在一切都很好。 :)
    猜你喜欢
    • 2014-07-19
    • 1970-01-01
    • 1970-01-01
    • 2014-09-22
    • 2021-02-10
    • 1970-01-01
    • 2018-01-11
    • 2012-09-12
    • 1970-01-01
    相关资源
    最近更新 更多