I have a nodejs project that is able to successfully read data from a google sheet using the nodejs google api when it is run as a command line script (using Oauth2 for authentication). However when the exact same google api calls are made with the exact same parameters, using the same client secret json file and OAuth token.json file, but this time from the back end of a nodejs webserver (using express), the following error is returned:
"code":403,"errors":[{"message":"The request is missing a valid API key.","domain":"global","reason":"forbidden"}]
It seems to be a strange error since API keys shouldn't be required when using OAuth2( or at least one isn't need when the call succeeds running as a single script).
I'm wondering if the google api code is somehow inferring the context in which it is running and is altering its behavior?