Google_AuthException [400]:获取OAuth2访问令牌时出错,消息:'invalid_grant'

时间:2014-12-19 16:18:12

标签: oauth-2.0 google-api

当我获得代码并发出令牌请求时,问题就出现了。使用在其他项目中正常工作的代码进行授权。我在开发者控制台和我的配置文件中检查凭据。尝试连接其他站点和其他帐户的授权没有产生任何结果。我检查了重定向,标题,但一无所获。

1 个答案:

答案 0 :(得分:0)

$ request = Google_Client :: $ io-> makeRequest(新的Google_HttpRequest(' https://accounts.google.com/o/oauth2/token',' POST',array(),array(           '代码' => $ _GET ['代码&#39],           ' grant_type' => ' authorization_code&#39 ;,           ' REDIRECT_URI' => $这 - > redirectUri,           ' CLIENT_ID' => $这 - >的clientId,           ' client_secret' => $这 - > clientSecret       )));

此请求返回"提取OAuth2访问令牌时出错,消息:' invalid_grant'"

相关问题