用于在Fusiontables上插入公共共享权限的Google Drive API调用会导致内部错误

jay*_*rau 5 google-fusion-tables google-drive-api

我一直在尝试使用Google Drive API使Fusiontable公开可读,并且无法使其工作.我可以使用OAuth 2.0 Playground为其他Google云端硬盘文档插入公共共享权限,但对于Fusiontables,我收到HTTP 500错误,"内部错误".请注意,我已尝试在"Drive API v2"和"Fusion Tables API v1"下包含所有可用范围.

我知道谷歌不再开发和支持Fusiontables,但我想知道是否有人找到了允许他们解决这个问题的解决方法?我还没有尝试过遗留/弃用的API版本.

以下是实际的API请求格式以及OAuth Playground对Fusiontable权限插入(HTTP 500)的响应,然后是Doc权限插入(HTTP 200).请求之间的唯一区别是请求URI中的fusiontable_id或document_id:

请求:

POST /drive/v2/files/<fusiontable_id or document_id>/permissions HTTP/1.1
Host: www.googleapis.com
Content-length: 33
Content-type: application/json
Authorization: Bearer <access_token>

{"role":"reader","type":"anyone"}
Run Code Online (Sandbox Code Playgroud)

融合响应:

HTTP/1.1 500 Internal Server Error
Content-length: 180
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Tue, 04 Nov 2014 23:51:58 GMT
Vary: Origin,Referer,X-Origin
Server: GSE
Cache-control: private, max-age=0
Date: Tue, 04 Nov 2014 23:51:58 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
{
  "error": {
    "code": 500, 
    "message": "Internal Error", 
    "errors": [
      {
        "domain": "global", 
        "message": "Internal Error", 
        "reason": "internalError"
      }
    ]
  }
}
Run Code Online (Sandbox Code Playgroud)

文件回复:

HTTP/1.1 200 OK
Content-length: 281
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Vary: Origin,Referer,X-Origin
Server: GSE
Etag: "M4l5RvCt2StP2jOGfgyJPGdTZTc/dgFZz37LrQjIXplUkmnh3VtemzQ"
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0, must-revalidate
Date: Wed, 05 Nov 2014 15:35:56 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
{
  "kind": "drive#permission", 
  "etag": "\"M4l5RvCt2StP2jOGfgyJPGdTZTc/dgFZz37LrQjIXplUkmnh3VtemzQ\"", 
  "role": "reader", 
  "type": "anyone", 
  "id": "anyone", 
  "selfLink": "https://www.googleapis.com/drive/v2/files/<document_id>/permissions/anyone"
}
Run Code Online (Sandbox Code Playgroud)

Eri*_*eda 3

这似乎是由于 Drive API 中的错误造成的。我已找到内部错误,并向工程团队提出了该问题。目前没有已知的解决方法。

  • 几个月后,看起来内部错误仍然存​​在?现在基于 XML 的 GData API 已被关闭,似乎确实没有解决方法...... (2认同)