2012-08-11 83 views
0

在與Q參數搜索時,我得到一個錯誤谷歌驅動器內部服務器錯誤搜索

Fatal Error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/drive/v2/files/root/children?q=title%20%3D%20%27hello%27 : (500) Internal Error'

我認爲這事做與報價,因爲它的作品,如果我搜索'trashed = false'

我使用最新的api客戶端c hecked out from: http://code.google.com/p/google-api-php-client/source/checkout

+0

您可以嘗試使用[API資源管理器](https://developers.google.com/apis-explorer/#p/drive/v2/drive.children.list? folderId = root&q = title +%253D +'hello'&_ h = 1&)並告訴我們它是否也失敗了?確保通過切換OAuth 2.0按鈕來授權應用程序。另外,你可以嘗試使用'$ service-> files-> list(array('q'=>「title ='hello'和父母的根目錄))''? – Alain 2012-08-13 15:49:34

+0

我認爲這可能是一個短暫的問題,我嘗試了OAuth Playground和PHP應用程序,它在兩種情況下都按預期工作。 – 2012-08-13 18:09:44

+0

在api explorer中工作。 – 2012-08-14 11:30:15

回答

0

畢竟這次試過它,現在它正在工作。

0

當您沒有要求正確的權限時,您會得到相同的錯誤消息。使用範圍https://www.googleapis.com/auth/drive,而不是(僅)https://www.googleapis.com/auth/drive.file

+0

我認爲你是對的,它與oauth範圍 – 2013-01-31 13:45:28