谷歌云端硬盘内部服务器搜索时出错


Google Drive Internal Server Error when searching

使用 q 参数搜索时出现错误:

PHP代码:

$parameters['q'] = "title = 'hello'"; 
$children = $service->children->listChildren('root',$parameters);

返回:

致命错误:未捕获的异常"Google_ServiceException",并显示消息 '调用 GET 时出错 https://www.googleapis.com/drive/v2/files/root/children?q=title%20%3D%20%27hello%27: (500) 内部错误'

我认为这与引号有关,因为如果我搜索"垃圾=假",它可以工作

我正在使用从以下位置签出的最新 api 客户端:http://code.google.com/p/google-api-php-client/source/checkout

经过这么长时间再次尝试,它现在可以工作了。

当您没有请求正确的权限时,您会收到相同的错误消息。使用范围https://www.googleapis.com/auth/drive,而不是(仅)https://www.googleapis.com/auth/drive.file