Google Drive API call to insert Public Share permissions on Fusiontables causes Internal Error

前端 未结 4 982
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-13 07:45

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

相关标签:
4条回答
  • 2021-01-13 07:57

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

    0 讨论(0)
  • 2021-01-13 08:07

    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.

    0 讨论(0)
  • 2021-01-13 08:09

    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)
    }
    
    0 讨论(0)
  • 2021-01-13 08:10

    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...

    0 讨论(0)
提交回复
热议问题