YouTube Data API本地无法运行问题求助
YouTube API 调用报错求助
我已花费大量时间排查该错误但仍未解决。我正在使用YouTube API根据搜索查询获取视频,在浏览器中访问localhost:3000/yt时出现报错,截图如下:
服务端代码
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);
Google Console OAuth设置
(包含密钥及客户端ID的JSON文件已放在项目目录中)
API设置

内容的提问来源于stack exchange,提问作者Mohamed Hendy
相关产品推荐
相关产品推荐

