Unable to access public sheet
I made a sheet publicly viewable and tried to load the info for the sheet and got the following error:
Error: Sheet is private. Use authentication or make public. (see https://github.com/theoephraim/node-google-spreadsheet#a-note-on-authentication for details)
@geoffsimons did you see this section of the readme?
Unauthenticated access (read-only access on public docs)
By default, this module makes unauthenticated requests and can therefore only access spreadsheets that are "public".
The Google Spreadsheets Data API reference and developers guide is a little ambiguous about how you access a "published" public Spreadsheet.
If you wish to work with a Google Spreadsheet without authenticating, not only must the Spreadsheet in question be visible to the web, but it must also have been explicitly published using "File > Publish to the web" menu option in the google spreadsheets GUI.
Many seemingly "public" sheets have not also been "published" so this may cause some confusion.
FYI - I've just a published a new version of this module which is a complete rewrite using Google's V4 Sheets API (v3 is being deprecated on March 3, 2020). Docs available here - https://theoephraim.github.io/node-google-spreadsheet
You'll need at least an API key to access a public sheet in the new version.
Thanks! 😄
You'll need at least an API key to access a public sheet in the new version.
Does this mean it's no longer possible to use a public sheet as a "database" for a website? It sounds like every user would need to have an API key.