Amir
Amir

Reputation: 1683

Error Getting Google Spreadsheet as JSON

I am trying to get a googlespreadsheet data as json using

https://spreadsheets.google.com/feeds/list/1KI1hps-RpAJZV8AkB6MpxO8V_le--111111111/od6/public/values?alt=json

but I get error message saying: "We're sorry. This document is not published."

The link to spreadsheet itself is working fine and anyone can access (indicating the sharing has no problem)

https://docs.google.com/spreadsheets/d/111111-RpAJZV8AkB6MpxO8V_le--111111/edit#gid=0

Appreciate if anyone can tell me what is the issue here

Upvotes: 1

Views: 277

Answers (1)

Robert Moskal
Robert Moskal

Reputation: 22553

Those two api endpoints aren't the same. A published spreadsheet isn't the same as one that can be edited by anyone.

Not sure why it needs to be published to export it as json, but here are the instructions:

https://support.google.com/docs/answer/37579?hl=en

Upvotes: 1

Related Questions