访问未配置的google drive API

时间:2012-12-22 12:44:38

标签: google-drive-api

当我访问google drive uri https://www.googleapis.com/drive/v2/files/1obpi0bmSDILX1cIQcVRNi1lUkm2K5xBFztmRFiM?fields=lastModifyingUserName%2CmodifiedDate%2CownerNames%2CselfLink&key= {YOUR_API_KEY}

我的服务https://code.google.com/apis/console

中的Drive SDK,Drive API都已启用

但仍然得到:

{
 "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"
}

1 个答案:

答案 0 :(得分:2)

我使用的是旧的api密钥,现在可以使用了!