php - Google Analytics API, getting constantly error 500 , when ask for profiles list -
i have script update profile list using
//all code inside class, , in class constructor, update token $this->token = $this->gettoken($this->accountid); $tokendata = json_decode($this->token); if($this->client->isaccesstokenexpired()) { $this->client->refreshtoken($tokendata->refresh_token); $this->token = $this->client->getaccesstoken(); $this->accesstoken = json_decode($this->token)->access_token; $this->savetoken($this->token,$this->accountid); } .... $this->service = new google_service_analytics($this->client); .. // ask profiles $profiles = $this->service->management_profiles->listmanagementprofiles("~all", "~all",array('max-results' => 500));
but when run code error
error calling https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles?max-results=500&key=##acess_key## : (500) backend error
this code, work, not , have lucky work , , know not token problem because can run other request getting visits specific profile without problem , reduced max-results 200,100,50... etc, still happening , have been update lastest code google api , clue?
Comments
Post a Comment