"无效的JSON有效负载错误"在使用Google表格API v4执行结构化查询时收到

时间:2018-05-05 19:50:58

标签: google-sheets google-spreadsheet-api

当我在Google文档中尝试此链接时,要根据username参数过滤我的工作表:

https://sheets.googleapis.com/v4/spreadsheets/spreadsheetid/values:batchGet?username="andika_1317"&key=mykey

我收到这样的回复:

{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"username\": Cannot bind query parameter. Field 'username' could not be found in request message.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "description": "Invalid JSON payload received. Unknown name \"username\": Cannot bind query parameter. Field 'username' could not be found in request message."
          }
        ]
      }
    ]
  }
}

我不知道为什么会收到错误回复,因为我在表格中创建了username字段: enter image description here

如何使用Sheets API执行这些查询?

0 个答案:

没有答案