-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Error while fetching spreadsheet from Google #33
Comments
The same issue for us in the same date. |
same here |
Same here |
same here, seems the changes recently from google about privacy affecting this lib |
Same here. It's caused by Google pulling the rug on their Sheets v3 API in August 2021. I replaced this module with https://github.com/revolunet/spreadsheet-to-json It's nearly a drop-in replacement. My old code was like... var gsjson = require('google-spreadsheet-to-json')
// Some crazy way to get a token here.
// I was using google-tokens... https://github.com/bradoyler/google-tokens
const rows = await gsjson({
spreadsheetId: documentId,
token: token.credentials.access_token
}) New code is... const { extractSheets } = require("spreadsheet-to-json");
// No token required, just make sure the document is shared (using the document's sharing UI)
// with the client_email mentioned in the service account keyfile.
// How do you get the keyfile? You create one in Google Cloud Console > IAM > Service Accounts.
const { ALL: rows } = await extractSheets({
spreadsheetKey: documentId,
credentials: require(`./.hiddenFromGit/my-google-generated-service-account-keyfile.json`),
}) |
Thank you for this library. We were using the following packages:
and they were working fine before but starting Aug 12 we are getting the following error while fetching the same spreadsheet:
We have not changed anything from our side. Can you please suggest?
The text was updated successfully, but these errors were encountered: