来自此ios客户端应用程序<empty>的请求被阻止

时间:2018-08-25 14:52:29

标签: ios swift google-sheets-api

我尝试使用Google Sheets API,并且这样做如下:

var service = GTLRSheetsService()
let query = GTLRSheetsQuery_SpreadsheetsValuesGet.query(withSpreadsheetId: SpreadSheetIdentifier, range: SpreadSheetRange)
service.apiKey = SpreadSheetApiKey
service.executeQuery(query, delegate: self, didFinish: #selector(displayResultWithTicket(ticket:finishedWithObject:error:)))

但是当我调用该函数时出现错误:

  

此ios客户端应用程序<empty>的请求被阻止。

我想念什么?

我的Google表格可以访问具有链接的任何人

Google的完整回复:

{
  "error": {
    "code": 403,
    "message": "Requests from this ios client application \u003cempty\u003e are blocked.",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.Help",
        "links": [
          {
            "description": "Google developer console API key",
            "url": "https://console.developers.google.com/project/722884849069/apiui/credential"
          }
        ]
      }
    ]
  }
}

0 个答案:

没有答案