I spent countless hours on this error but couldn't figure it out. I'm using the YouTube API to retrieve videos based on a search query. In the browser, when I search for localhost:3000/yt, it shows this message:
The server-side code is shown below:
app.get('/yt', async (req, res) => { const auth = await authenticate({ keyfilePath: "/Users/hendy/Desktop/Dev/HCI-Summer-Research/EduRec/system/oauth2.keys.json", scopes: ['https://www.googleapis.com/auth/youtube'] }); google.options({auth}); const result = await youtube.search.list({ part: 'snippet', q: 'Node.js on Google Cloud', }); res.send(result.data);}) app.listen(3000);The OAuth setup from Google Console is shown below. The JSON file that contains this info and my secret and client ID keys is in my project folder.
And this is the API setup:

