Php 谷歌搜索控制台API-SearchAnalytics 500错误
我正在尝试使用SearchAnalyticsQuery从搜索控制台Api中获取一些数据 首先,我用PHP进行了尝试:Php 谷歌搜索控制台API-SearchAnalytics 500错误,php,api,google-webmaster-tools,Php,Api,Google Webmaster Tools,我正在尝试使用SearchAnalyticsQuery从搜索控制台Api中获取一些数据 首先,我用PHP进行了尝试: $this->client->setAccessToken( \Session::get('access_token') ); $webmaster = new \Google_Service_Webmasters( $this->client ); $q = new \Google_Service_Webmast
$this->client->setAccessToken( \Session::get('access_token') );
$webmaster = new \Google_Service_Webmasters( $this->client );
$q = new \Google_Service_Webmasters_SearchAnalyticsQueryRequest();
$q->setStartDate('2015-01-01');
try {
$webmaster->searchanalytics->query('http://example.com', $q);
} catch(\Exception $e )
{
dd($e);
}
我有一个有效的令牌,它执行请求,但总是返回以下内容:
Error calling POST https://www.googleapis.com/webmasters/v3/sites/example.com/searchAnalytics/query: (500) Backend Error
为了确保这不是由PHP代码引起的,我还使用GoogleAPI浏览器进行了尝试
同样的结果如下:
我目前正在使用的是的dev master版本
一定是我做错了什么,我就是想不出来 您没有设置
endDate
(必需参数)-请参阅。我会尽快尝试!谢谢你刚才是不是为了告诉我这件事而开了个账^^没问题,是的,我做了,因为搜索控制台API非常容易使用。