Enable Google Sheets API in Google API console
The Google Sheets API lets you perform administrative operations on accounts and computers stored on a Google Sheets file. The Google Sheets API must be enabled before it can be used.
To enable Google Sheets API, log into the Google API console, select the Google Sheets API and click ENABLE.