I have thorougly researched this, found many answers on this site, but just can't get it to work. I must be missing something.
I have the following public sheet: https://docs.google.com/spreadsheets/d/11CwVCfIiJHlC-PhaT_hD8aB1q77VwecCgOuwzyuwZkY/edit?usp=sharing I paste in my key https://spreadsheets.google.com/feeds/list/11CwVCfIiJHlC-PhaT_hD8aB1q77VwecCgOuwzyuwZkY/od6/public/values?alt=json
Get an error that the document is not published.
Calling a REST API in Google Sheets is as easy as installing the Apipheny app, then opening the app in your Google Sheet, entering your API request, and clicking “Run”. Keep reading for instructions on how to import REST API data into Google Sheets.
As agershun already pointed out, you need to publish the document. Follow these steps:
1) File menu > Publish to the web...
2) Click the Start Publishing button
3) Load your URL and you'll see it in JSON
Note: Here is my working example, the URL formed exactly like yours, except this one is published: https://spreadsheets.google.com/feeds/list/1qym45VIwM4ruaWDkqndaOBzgOMAhOsjZ7rL76wJrTkY/od6/public/values?alt=json
If after you've done all this and you receive the error Invalid query parameter value for grid_id.
then refer to this post for a solution:
Retrieve Google Spreadsheet Worksheet JSON
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With