5

I have been trying to use the Google Drive API to make a Fusiontable publicly readable, and have not been able to get it to work. I am able to use the OAuth 2.0 Playground to insert public share permissions for other Google Drive documents, but for Fusiontables I get an HTTP 500 error, "Internal Error". Note that I have tried including every scope available under "Drive API v2" and "Fusion Tables API v1".

I'm aware that Google is no longer developing and supporting Fusiontables, but I'm wondering if anyone has found a workaround that allows them to get around this problem? I haven't tried legacy/deprecated versions of the API either.

Here's are the actual API request format and responses from OAuth Playground for a Fusiontable permissions insert (HTTP 500), then a Doc permissions insert (HTTP 200). The only difference between requests is the fusiontable_id or document_id in the Request URI:

Request:

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"}

Fusiontable Response:

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"
      }
    ]
  }
}

Doc response:

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"
}
4
  • 1
    To clarify: "Google is no longer developing and supporting Fusiontables" is not the case, and I'd be interesting in hearing where that idea came from :-) If you send this question to [email protected] with the actual Fusion Tables doc ID, we can take a look at our logs to figure out what the problem might be. Nov 5, 2014 at 19:57
  • Thanks Rod, I will follow up as you suggested. I thought Fusion Tables development had stopped because the Fusion Tables API Users Group is no longer monitored, and because the issue with reloading Google Spreadsheets seems old enough and important enough that it would have been fixed if Fusion Tables were still being developed.
    – jaybrau
    Nov 6, 2014 at 16:17
  • I should probably reword the "not being monitored" verbiage there to clarify that FT is active, just not on that list. As for the spreadsheet import thing, there was a general problem with all Drive apps during that period that would have the same symptoms but not the same cause. Spreadsheet imports are stable nowadays. Nov 6, 2014 at 22:50
  • Count me very relieved, we have a high-traffic app that was built around Fusion Tables and would have a significant problem if it went the way of Google Reader.
    – jaybrau
    Nov 7, 2014 at 18:56

4 Answers 4

3

This appears to be due to a bug in the Drive API. I've located the internal error and have raised the issue with the engineering team. At this time there are no known workarounds.

1
  • 2
    After a few months, looks like the internal error is still there? And now that the XML-based GData API has been turned off, there indeed seems to be no workaround...
    – Arseniy
    Apr 22, 2015 at 13:01
2

I have a good news!

I've received an email from googletables-feedback. They says that it should be working now.

My code on Google Client JS API works fine

var setAccess = function setAccessF() {
    gapi.client.request({
        path : '/drive/v2/files/{fileID}/permissions',
        method : 'post',
        body : {
            'value' : 'anyone',
            'type' : 'anyone',
            'role' : 'reader'
        }
    }).then(opt_onFulfilled, opt_onRejected);
}

function opt_onRejected(e) {
    console.log(e)
}

function opt_onFulfilled(e) {
    console.log(e)
}
1
  • 2
    I'm not using Google Client JS API, but I confirmed that I can now automate making a FusionTable public. Thanks!
    – jaybrau
    May 18, 2015 at 16:00
0

If you'd be OK with a temporary workaround, inserting Fusion Table public share permission still works with older XML-based GData API. You can check it out here, though beware of the red banner at the top of the page saying 'The deprecation period for Version 3 of the Google Documents List API is nearly at an end. On April 20, 2015, we will discontinue service for this API.'

So if you need to workaround the problem now, that would keep you going till April and then let's hope the Drive API bug gets fixed before that...

1
  • 1
    I added the workaround to one of my GitHub projects, so you could look at the code there: goo.gl/NDxHIr The method at line 165, it's Objective-C though most of it is just shaping up a POST request which should be easily readable.
    – Arseniy
    Dec 31, 2014 at 6:39
0

Personally, the document I was attempting to add the permissions to had become invalid. This might also be an issue for someone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.