我正在嘗試開發一個應用程序,該服務器端每晚請求我的Google分析配置文件。我看到一些過時的帖子,PHP的API庫不支持Google分析的服務帳戶。Google服務帳戶 - Google AnalyticsAPI v3
我按照這些指令(編輯答案):
Service Applications and Google Analytics API V3: Server-to-server OAuth2 authentication?
當我跑我得到了一個連接復位錯誤,我的測試服務器上的代碼,我得到一個500內部。
錯誤發生在上面答案的這一部分。
$service->data_ga->get($ids, $startDate, $endDate, $metrics, $optParams);
私鑰的路徑是正確的,我在5.3.8