Tag: google contacts

如何让Google与Google通讯录API联系图片?

使用Node.js处理Google contacts API 我正在获取除Google Feed API以外的所有联系人 https://www.google.com/m8/feeds/photos/media/faizy04%40gmail.com/ya29.ZAFTNcQ6sEue40gFqH5h8h91k8LO8Bwvf50NUgQKKmsD5fipWg9XvN5GeHmyref_TK1xJZVrB9Ubuw 为了获得联系,我已经通过passport.js传递了下面的范围 passport.authenticate('google', { scope : ['profile', 'email','https://www.google.com/m8/feeds'] }) 一切工作正常。 现在我想要获取相关联系人的所有图片。 我是否需要传递其他参数在范围variables或需要发送另一个GET请求呢?

无法从nodejs删除谷歌联系人

从官方的谷歌联系api文档: 删除联系人 要删除联系人,请将授权的DELETE请求发送到联系人的编辑url。 该URL的格式是: https://www.google.com/m8/feeds/contacts/ {userEmail} / full / {contactId} 简单的删除请求返回401 error作为响应。 var url = "https://www.google.com/m8/feeds/contacts/"+req.token.body.sub.agent.agentId+"/full/"+result.googleId; unirest.delete(url) .header({ 'Authorization': 'accessToken='+req.token, 'If-Match': '*', }) .timeout(60000) .end(function (res1) { console.log('delete success… ', res1); res.send(res1); }); 注:我尝试了'Authorization': 'Bearer '+req.token,但仍然是同样的问题

在Google Contacts API版本3.0上使用oauth2检索刷新标记

我正在使用oauth2(node.js和connect-oauth库)连接到谷歌联系人API版本3.0 。 这样做,我得到一个回应,如: { access_token : "…", "token_typen": "Bearer", "expires_in" : 3600, "id_token": "…" } 我错过刷新令牌用于获取一个新的访问令牌,只要后者过期。 oauth2的选项 { host: 'accounts.google.com', port: 443, path: '/o/oauth2/token', method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', Host: 'accounts.google.com', 'Content-Length': 247 } } post-body'redirect_uri = http%3A%2F%2Flocalhost%2Foauth2callback&grant_type = authorization_code&client_id = CLIENTID&client_secret = CLIENTSECRET&type = web_server&code = 4%2F3gbiESZTEOjiyFPLUhKfE_a_jr8Q' 注意:我试图从类似的问题向request-post_body添加approval_prompt = force,但是这导致了一个错误 { statusCode: 400, […]