I just want to pull my spreadsheet into an app/website. Ideally, I'd like it to be private, but first I'm trying to bring in the data with the spreadsheet "available to the public" and "published to the web".
$.ajax({ type: 'GET', url: 'http://spreadsheets.google.com/feeds/cells/' + spreadsheetKey + '/od6/public/full?alt=json', success: function(data){ alert("success"); } }); This always results in:
"You do not have view access to the spreadsheet. Make sure you are properly authenticated."
I've tried without ?alt=json, with 'list' instead of 'cells', and with 'values' instead of 'full'. Nothing works.
Also, is there a way to pass the access token into this call? I'm authenticating via Google Sign-In and allowing for Spreadsheet API scope. I've tried &accessToken=xxx and &access_token=xxx. The documentation doesn't have anything for Javascript.