4
votes

Try the following workflow:

  1. Create a Google Spreadsheet. Set its ACL to “Anyone with the link”
  2. Get its key (https://spreadsheets0.google.com/spreadsheet/ccc?key=HEREISTHEKEY)
  3. Try accessing it with the HTTP API: https://spreadsheets.google.com/feeds/list/HEREISTHEKEY/o6d/public/full (try with private instead of public also)
  4. Get a 404 error

It seems that the Google Spreadsheet API does not allow accessing a private link from the API when you are not authenticated, but maybe I'm wrong somewhere.

It's kind of illogical because you don't need to be logged in when accessing this spreadsheet from a browser.

Any thoughts (I'll fill up a bug report)?

Thanks!

2

2 Answers

0
votes

One thought, and I'm not sure if this is applicable to your situation, is that you might try building a dummy Google account and having your interface access the HTTP API using those dummy credentials. It's dirty, but it might work, as once you're logged in you should definitely be authenticated. Right?

0
votes

To be able to access it via the API, you need to "publish" the spreadsheet. You can do this via the file menu:

File > "Publish to the web..."

You'll then be able it via the API with the URL you gave. I had this issue initially too!