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
});
答案 0 :(得分:2)
使用firebase的spark计划,域名受到限制,您无法调用Google以外的任何API。
对于您的情况,您应该将www.google.com
替换为www.googleapis.com
以使其正常工作
答案 1 :(得分:0)
网址中的用户名应为default
,而不是me
。