-
Firstly delete the credentials files
~/.credentials/sheets.googleapis.com-nodejs-quickstart.json
(depending on your setting) -
Change the scope variable used for reading cells from Google Spreadsheets from
var SCOPES =
[‘https://www.googleapis.com/auth/spreadsheets.readonly‘];
to
var SCOPES = [‘https://www.googleapis.com/auth/spreadsheets‘];
- After the execution of code, API will authenticate again and then the issue will be resolved.