2012-12-22 198 views
1

當我訪問谷歌雲端硬盤URI https://www.googleapis.com/drive/v2/files/1obpi0bmSDILX1cIQcVRNi1lUkm2K5xBFztmRFiM?fields=lastModifyingUserName%2CmodifiedDate%2CownerNames%2CselfLink&key= {YOUR_API_KEY}訪問未配置谷歌驅動API

我有兩個驅動SDK,驅動器的API在我的服務https://code.google.com/apis/console

,但仍然獲得了:

{ 
"error": { 
    "errors": [ 
    { 
    "domain": "usageLimits", 
    "reason": "accessNotConfigured", 
    "message": "Access Not Configured" 
    } 
    ], 
    "code": 403, 
    "message": "Access Not Configured" 
} 
} 

如果我運行這個通過https://developers.google.com/drive/v2/reference/files/get#try-it它工作正常!

如何正確返回json?

{ 
"selfLink": "https://www.googleapis.com/drive/v2/files/1obpi0bmSDILX1cIQcVRNi1lUkm2K5xBFztmRFiM", 
"modifiedDate": "2012-12-13T20:41:07.602Z", 
"ownerNames": [ 
    "Norman" 
], 
"lastModifyingUserName": "Norman" 
} 

回答

2

我正在使用舊的API密鑰,現在可以使用!

+0

創建新的客戶端ID也解決了我的問題。它以前工作但神祕地停止。我的舊客戶端ID格式爲{number} .apps.googleusercontent.com,新格式爲{number} - {gibberish} .apps.googleusercontent.com。 –