title: Google Sheets API node.js quickstart won't work: The API returned an error: Error: unauthorized_client
body: <p>I've been messing with the Google Sheets API for a project and everything has been going pretty well. I followed all the steps <a href="https://developers.google.com/sheets/quickstart/nodejs" rel="nofollow noreferrer">On this page</a> and got the quickstart working great for a while... Until I ran into an issue where I was getting the error message <code>API returned an error: Error: The request does not have valid authentication credentials.</code></p>
  
  <p>To resolve this I tried a bunch of different things from changing the SCOPES variable to commenting and uncommenting out things.</p>
  
  <p>Eventually I deleted the project and credentials on my google developers console account and tried to make a new one.</p>
  
  <p>Whenever I start a new folder from scratch, make a quickstart.js file, install the node modules and run it, now I get <code>The API returned an error: Error: unauthorized_client</code>. I've made completely new client_secret.json files and made the quickstart.js from scratch directly using the quickstart walkthrough code and it won't work. What could be causing this?</p>
  
  <p><a href="https://github.com/R-Dubz/DaycareScheduler/tree/master/Sheets%20API%20Quickstart" rel="nofollow noreferrer">Link to github (this is the code that WAS mostly working until I tried to delete rows from my google sheet after copying data to my sql database).</a></p>