usfuck google_auth_exception:错误获取oauth2访问令牌,消息:' invalid_client:未授权'
有人可以帮助我,因为在尝试将我的应用与Google日历链接时,我会遇到错误。
我得到错误:
致命错误:未被发现的Google_auth_exception:错误获取OAuth2访问令牌,消息:'invalid_client:未经授权'in/web/htdocs/www.assiweb.cloud/home/home/home/myproject/mmyproject/google/google/auth/auth/oauth/oauth2.php:132 堆栈跟踪: #0/web/htdocs/www.assiweb.cloud/home/myproject/google/google/client.php(128):google_auth_oauth_oauth2-2-> authenticate('4/0ax4x4x4xfwin-ucy ...'',false) #1/web/htdocs/www.assiweb.cloud/home/myproject/includes/calendar.php(24):google_client-> authenticate('4/0ax4x4xfwin-ucy ...''4/0ax4xfwin-ucy ...'')。
当我遇到错误时客户端上的代码是:
public function authenticate($code, $crossClient )
{
$this->authenticated = true;
return $this->getAuth()->authenticate($code, $crossClient);
}
以及我在calendar.php中获得错误的代码(第24行)是:
$client->authenticate($_GET['code'],true);
这些代码行不是由我写的,但是我必须解决此问题,我不知道来自Google Oauth的很多东西,有人可以帮助我如何解决它或给我一个完整的工作代码如何将我的应用程序与Google帐户链接到使用日历。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您不正确地将授权应用于客户。尝试检查一下。
It sounds like your not properly applying your authorization to the client. Try checking this.
Oauth2callback.php
Oauth2Authentication.php