【发布时间】:2019-04-26 11:55:11
【问题描述】:
我有一个项目,其中 Google 协作平台 API 在 2019 年 3 月停止工作。我不断收到以下错误消息。
我已经检查了一些必要的事情,例如启用了 API、范围和启用了 Google Admin API 访问。
[26-Apr-2019 13:42:02 Europe/Minsk] PHP 致命错误:未捕获的异常“Google_Auth_Exception”,消息“刷新 OAuth2 令牌时出错,消息:'{ “错误”:“未授权客户端”, “error_description”:“客户端未授权使用此方法检索访问令牌,或者客户端未授权任何请求的范围。” }
- google-api-php-client\src\Google\Auth\OAuth2.php(314): Google_Auth_OAuth2->refreshTokenRequest(Array)
- google-api-php-client\src\Google\Auth\OAuth2.php(239): Google_Auth_OAuth2->refreshTokenWithAssertion()
- google-api-php-client\src\Google\Service\Resource.php(214): Google_Auth_OAuth2->sign(Object(Google_Http_Request))
- google-api-php-client\src\Google\Service\Directory.php(1703): Google_Service_Resource->call('list', Array, 'Google_S in google-api-php-client\src\Google\ Auth\OAuth2.php 在第 363 行
我没有对我的代码和 Google Developer Console 中的凭据或 G Suite 进行任何更改。 API 突然停止工作可能出了什么问题?
非常感谢您。
【问题讨论】:
标签: php google-api