Suddenly Getting 403 Errors ... on a Public Spreadsheet
See original GitHub issueI have a publicly shared spreadsheet (I can open it up in Incognito Mode just fine). I have a script, written with google-spreadsheet, which updates that spreadsheet. It used to work great.
Now however when I try to use the library I get 403 errors:
Error: Google API error - [403] The caller does not have permission
at createError (/home/me/project/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/me/project/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/me/project/node_modules/axios/lib/adapters/http.js:269:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
… which makes no sense, because again the spreadsheet is public: no one should get a 403 when accessing it. Plus, I am giving access to the script when I access the sheet:
const doc = new GoogleSpreadsheet(spreadsheetUrl);
const credentials = JSON.parse(await readFile(CREDENTIALS_PATH, 'utf8'));
await doc.useServiceAccountAuth(credentials);
await doc.loadInfo(); // loads document properties and worksheets
(where CREDENTIALS_PATH is a working path to a credentials JSON file from Google).
Is there any possibility this library could be reporting false 403 errors, because again it shouldn’t even possible to get legitimate ones on a public spreadsheet.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
403 PERMISSION_DENIED [111262653] - Visible to Public
We suddenly started getting 403 responses from our API. ... Please file a new bug with sample spreadsheets and the full error messages...
Read more >403 Forbidden Error: What It Is and How to Fix It - Airbrake Blog
The most common cause of a 403 Forbidden Error is simply inputting an incorrect URL. As discussed before, many tightly secured web servers ......
Read more >Getting 403 from Google Sheets API using apikey [closed]
This seems to be an error on google's side. ... See related question: Cannot access public sheet with Sheets API.
Read more >Issues with Google Drive - AppSheet Help
Users of Google Drive can sometimes see Error 403 (permission denied) or Error 404 (not found). There are a few common reasons for...
Read more >403 Forbidden error: What it is and how to fix it - Allconnect.com
The reason might be within your control – but it's more likely caused by something on the content owner or server side. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Theo, nice concrete proposal, thanks. I beg your pardon ,your program works well : I made a mistake in my sheet sharing “full shared” I had selected : reading only . I made a test with “editor” and it works well as you documented (https://theoephraim.github.io/node-google-spreadsheet/#/?id=the-basics) - that is solved for me May be @machineghosh , you made the same mistake ?
Hi, I made tests today with this very clear lib, thanks to Theo, and I have only access in reading (no adding, update) on a full shared GGsheet.