1

I am trying to get JSON data from publicly shared Google SpreadSheets that are created by from other users.

To call that api I use the following url format: https://spreadsheets.google.com/feeds/list/[sheet_id]/[tab_id]/public/basic?alt=json

But when I set the sheet_id from the one I get from a shared link I receive 404 response. :-(

enter image description here

By the way, I can get JSON data from same shared link if I make it public on the web.

Like this:

enter image description here

Can I get json data from only another users shared link?

This is my application condition.

  1. Shared link can be sent from many people.
  2. Those links are not public to the web.
  3. I make sheet_id from shared link and call api.
  4. I run application from api response data.

Thank you for your patience and please excuse my poor English.

Alexander Higgins
  • 6,765
  • 1
  • 23
  • 41
minmin
  • 53
  • 1
  • 13
  • Can you share an example shared link and the full HTTP request you're making? – user94559 Jul 20 '17 at 02:43
  • this may give you some direction https://stackoverflow.com/questions/30082277/accessing-a-new-style-public-google-sheet-as-json, I think to get a private sheet data you need authentication. – gusaindpk Jul 20 '17 at 02:52
  • @smarx Thank you! This is sample url! https://docs.google.com/spreadsheets/d/1TlGL9JASdAidux2xAMKKbWOeMEAJswzRUdp4cWqnDzg/edit?usp=sharing – minmin Jul 20 '17 at 03:22

1 Answers1

1

I'm not sure what API method you're using, but this seems to work fine on the example spreadsheet you gave. (Make sure to include your API key.)

GET https://sheets.googleapis.com/v4/spreadsheets/1TlGL9JASdAidux2xAMKKbWOeMEAJswzRUdp4cWqnDzg/values/texts?key=<REDACTED>
user94559
  • 59,196
  • 6
  • 103
  • 103