Php Google API OAuth2.0错误请求无效\u授权

Php Google API OAuth2.0错误请求无效\u授权,php,http,oauth-2.0,google-api,bad-request,Php,Http,Oauth 2.0,Google Api,Bad Request,我需要我的服务器应用程序从google API(方法)检索身份验证令牌,但我只得到400响应(错误请求),并且返回了{“error”:“invalid_grant”}。这是我的请求数据: { ["method"]=> "POST" ["header"]=> "Content-type: application/x-www-form-urlencoded" ["content"]=> "client_id={my google client email}&client

我需要我的服务器应用程序从google API(方法)检索身份验证令牌,但我只得到400响应(错误请求),并且返回了
{“error”:“invalid_grant”}
。这是我的请求数据:

{ ["method"]=> "POST" 
["header"]=> "Content-type: application/x-www-form-urlencoded" 
["content"]=> "client_id={my google client email}&client_secret={my secret code}&grant_type=authorization_code&code={returned temporary token}&redirect_uri=http%3A%2F%2Fwww.lunariumfashion.com%2Fsetup_picasa" } }
我正在使用这个库进行身份验证,还尝试了使用AJAX进行黑客攻击,结果类似


我被困在这里24小时,阅读我找到的所有东西,请帮帮我

客户id不是您的电子邮件。它是谷歌在注册你的应用程序时提供给你的标识符。与
secret
相同

按照以下说明操作(忽略文档中对auth0的引用):