0

我們使用此步驟來設置我們的工具。 Hello Analytics Reporting API V4; PHP quickstart for service accounts帶有「請求具有無效身份驗證憑據」的Google Analytics報告API V4

這裏是例如,從演練https://advertisebg.com/report1610/GA/HelloAnalytics.php和代碼是完全一樣的例子

Fatal error: Uncaught Google_Service_Exception: { "error": { "code": 401, "message": "Request had invalid authentication credentials.", "errors": [ { "message": "Request had invalid authentication credentials.", "domain": "global", "reason": "unauthorized" } ], "status": "UNAUTHENTICATED" } } in /home/advbg/public_html/report1610/GA/src/Google/Http/REST.php:118 Stack trace: #0 /home/advbg/public_html/report1610/GA/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #1 /home/advbg/public_html/report1610/GA/src/Google/Task/Runner.php(181): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #2 /home/advbg/public_html/report1610/GA/src/Google/Http/REST.php(58): Google_Task_Runner->run() #3 /home/advbg/public_html/report1610/GA/src/Google/Client.php(782): Google_Http_REST::execute(Object(GuzzleHttp\Client), in /home/advbg/public_html/report1610/GA/src/Google/Http/REST.php on line 118

數小時後沒有我們收到以下錯誤任何問題「請求了無效的認證證書」

幾次我們重新啓動新項目,重新創建證書,安裝新的示例和每一次 - 相同的結果,工作幾個小時後,我們看到上面的錯誤。

任何想法?

回答