google-api-nodejs-client获取谷歌联系人
我试图让我的google联系人列表与nodejs。
我只是按照“ https://github.com/google/google-api-nodejs-client/ ”页面上的说法进行操作,但在调用“新OAuth2”时收到错误消息。
在简单的代码下面
var googleapis = require('googleapis'); var OAuth2 = googleapis.auth.OAuth2, client_id = '21486685252.apps.googleusercontent.com', client_secret = '*********', redirect_url = 'http://127.0.0.1:3000/auth/google/return', oauth2Client = new OAuth2(client_id, client_secret, redirect_url);
在收到的错误之下:
TypeError: undefined is not a function at Object.<anonymous> (C:\Program Files\nodejs\passport\google\passport-google-login.js:15:20) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:901:3
你可以帮我吗 ?
- Google API服务帐户和nodejs
- Node.js oauth2模块用于无标头检索访问令牌
- 如何将经过authentication的RESTful oAuth 2后端请求发送到Google API
- 在Google Contacts API版本3.0上使用oauth2检索刷新标记
- 使用node.js和google-api获取Gmail收件箱
- 无法授权通过Google API node.js SDK使用现有的访问令牌
- Google电子表格api请求的authentication范围不足
- 持续访问Google Calendar API
- Node googleapis:在短时间内获取错误:invalid_request