invalid_grant使用服务帐户和Google Drive API返回
我花了两天时间使用服务帐户搞乱各种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" }
我已经三次+检查了我的申请范围。
我究竟做错了什么?
结果我的服务器上的时间快了5分钟。
当我纠正服务器上的时间时,一切正常。
我认为这会导致某种身份validation问题,因为Google服务器时间不接受来自我的服务器的请求的时间戳或者这些内容……
(希望这可以节省一些人的头部撞击)