嘗試使用Google Drive API獲取文件時出現錯誤消息。使用Python,導致錯誤的行是:Google Drive的每日限制錯誤消息
file = service.files().get(fileId=googleDriveFileId).execute()
的錯誤信息是:
HttpError: <HttpError 404 when requesting
https://www.googleapis.com/drive/v2/files/0B6Cpn8NXwgGPSE8zQW10XzJMc0k?alt=json returned
"File not found: 0B6Cpn8NXwgGPSE8zQW10XzJMc0k">
基本上說「找不到文件」
但是,如果我把URL被請求進入瀏覽器,我收到一條不同的錯誤消息:
https://www.googleapis.com/drive/v2/files/0B6Cpn8NXwgGPSE8zQW10XzJMc0k
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit Exceeded. Please sign up",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit Exceeded. Please sign up"
}
}
這兩個錯誤消息都不正確t我。我知道該文件在那裏。這裏是一個有效鏈接在谷歌驅動器UI從「分享鏈接」檢索到的同一個文件:
https://docs.google.com/file/d/0B6Cpn8NXwgGPSE8zQW10XzJMc0k
我還檢查API控制檯中的配額的報道,而我們正處於0%的使用率。
任何想法這裏發生了什麼?
謝謝