簡體   English   中英

如何修復Google Sites Feed API?

[英]How to fix Google Sites Feed API?

我有一個項目,其中Google Sites API在2019年3月停止工作。我不斷收到以下錯誤消息。

我已經檢查了必要的事情,例如啟用了API,范圍和啟用了Google Admin API訪問權限。

[26-Apr-2019 13:42:02歐洲/明斯克] PHP致命錯誤:未捕獲的異常'Google_Auth_Exception'出現消息'刷新OAuth2令牌時出現錯誤,消息:'{“錯誤”:“未授權客戶端”,“ error_description”:“客戶無權使用此方法檢索訪問令牌,或者客戶無權進行任何請求的范圍。” }

  1. google-api-php-client \\ src \\ Google \\ Auth \\ OAuth2.php(314):Google_Auth_OAuth2-> refreshTokenRequest(Array)
  2. google-api-php-client \\ src \\ Google \\ Auth \\ OAuth2.php(239):Google_Auth_OAuth2-> refreshTokenWithAssertion()
  3. google-api-php-client \\ src \\ Google \\ Service \\ Resource.php(214):Google_Auth_OAuth2-> sign(Object(Google_Http_Request))
  4. 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中的CREDENTIALS進行任何更改。 API突然停止工作可能會出什么問題?

提前非常感謝您。

使用Google Sites API的NodeJS腳本具有相同的令人驚訝的行為。

在GSuite開發者管理控制台中,幾個月前(!)刪除了Google協作平台的某些范圍,必須將其替換為新的范圍:

GSuite開發人員控制台

這個提示幫助了我。 當使用“舊”范圍( 提供了無效的舊范圍 )時,使用OAuth 2 API Playground顯示了更為精確的錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM