1

当我访问谷歌驱动器 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"
}
4

1 回答 1

2

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

于 2012-12-23T14:49:33.863 回答