NodeJs Firebase functions - getaddrinfo ENOTFOUND https://google.com

时间:2017-06-15 10:22:02

标签: node.js firebase firebase-realtime-database google-contacts google-cloud-functions

I am trying to use google contact api in firebase free plan. It gives me an error ERROR: getaddrinfo ENOTFOUND www.google.com www.google.com:443

As far as I know firebase allow us to user google services in their free plan but why I am getting this error.

var options = {
          host: 'www.google.com',
          path: '/m8/feeds/contacts/default/full?access_token=token&alt=json'
        };

https.get(options, function(res) {
//my function
});

2 个答案:

答案 0 :(得分:2)

使用firebase的spark计划,域名受到限制,您无法调用Google以外的任何API。

对于您的情况,您应该将www.google.com替换为www.googleapis.com以使其正常工作

答案 1 :(得分:0)

网址中的用户名应为default,而不是me