【问题标题】:Access Not Configured google drive API访问未配置的谷歌驱动 API
【发布时间】:2012-12-22 12:44:38
【问题描述】:

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

【问题讨论】:

    标签: google-drive-api


    【解决方案1】:

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

    【讨论】:

    • 创建一个新的客户端 ID 也解决了我的问题。它以前可以工作,但神秘地停止了。我的旧客户端 ID 格式为 {number}.apps.googleusercontent.com,新客户端 ID 格式为 {number}-{gibberish}.apps.googleusercontent.com。
    猜你喜欢
    • 1970-01-01
    • 2013-04-30
    • 2012-08-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-18
    • 2019-10-12
    • 1970-01-01
    相关资源
    最近更新 更多