【问题标题】:Fetching google sheets data from firebase "Billing account not configured" even if it's google api从firebase“未配置计费帐户”获取google表格数据,即使它是google api
【发布时间】:2018-08-17 04:48:16
【问题描述】:

我正在尝试从谷歌电子表格中获取一些数据。根据 Firebase 的定价,它表示云功能仅限于谷歌服务,这意味着这应该可以工作。但是,当我尝试获取数据时出现错误:

Error: getaddrinfo ENOTFOUND spreadsheets.google.com spreadsheets.google.com:443
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

我正在尝试使用以下代码:

export const fetchExcel = functions.https.onRequest((req, res) => { 

const query = "https://spreadsheets.google.com/feeds/list/hidden/od6/public/values?alt=json"
https.get(query, resp => {console.log (resp)});
 });

所以我没有对非谷歌服务进行 api 调用,但不知何故我相信它阻止了我。你还能怎么做?

【问题讨论】:

标签: firebase google-sheets google-cloud-functions


【解决方案1】:

无需付款计划,Cloud Functions 即可向受 Google 控制的 API 发出传出 HTTP 请求。通常,这些都是有据可查的 API,并且可以防止滥用。然而值得注意的是,这并不一定包括 google.com 域中的任何内容。 API 必须被明确列入白名单,才能在没有付款计划的情况下使用。

如果您遇到未列入白名单的由 Google 控制的正式 API,请file a feature request 进行评估。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多