8

In Google Firebase pricing (https://firebase.google.com/pricing/) table states:

The Spark plan only allows outbound network requests to Google-owned services.

Does it mean that JS function in web browser (client) page can't call Firebase function and retrieve data in FREE TIER?

KENdi
  • 7,576
  • 2
  • 16
  • 31
Benny7500
  • 569
  • 6
  • 16
  • Found probably good answer: "We just can't allow arbitrary REST calls without a credit card. This helps avoid Cloud Functions being used for abuse/malware." – Benny7500 Apr 05 '17 at 13:12

3 Answers3

8

firebaser here

Good catch, that piece of documentation probably should be clarified.

Inbound requests are allowed, as long as you're within your allowed quota. So your app can call a Cloud Function.

Outbound requests for projects on the free plan are only allowed to Google-owned services. So your Cloud Function code can only call google owned web APIs, unless it's on a paid plan.

Update: the above applies up to Node.js runtimes up to v8. From Node.js 10 and upwards your Firebase project needs to be on a paid plan to be able to use Cloud Functions. For full details on this, see the Firebase FAQ on Cloud Functions pricing.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • What exactly qualifies as "Google-owned services"? I'm trying to hit `https://suggestqueries.google.com/complete/search?&q=myKeyWord` on a free tier function but my server logs still block it and consider it an "external connection" – matmo Aug 10 '19 at 21:04
  • I get a 400 on that URL. What service is supposed to be hosted there? – Frank van Puffelen Aug 11 '19 at 01:53
  • https://suggestqueries.google.com/complete/search?output=firefox&client=firefox&q=searchTermHere is the full url actually - apparently the query params are required. It returns basic autocomplete suggestions from google. – matmo Aug 12 '19 at 02:07
  • 1
    Yeah, it could be that this URL is not whitelisted. I'd suggest [filing a bug report](https://firebase.google.com/support/contact/bugs-features/), to see if it can be added. – Frank van Puffelen Aug 12 '19 at 03:33
  • Hello sir, I was even facing problems on requesting app script api from firebase functions. As it was not counted for the free tier. So I have to switch to paid plan. – Abhishek Feb 07 '20 at 15:45
  • @FrankvanPuffelen what about this? https://stackoverflow.com/questions/64201186/can-i-use-firebase-cloud-functions-with-mongodb-atlas-running-on-gcp-in-spark-ti – Ethan SK Oct 05 '20 at 00:42
1

At lowest possible costs (USD 11.53) it is better to have Blaze plan and use REST calls to Firebase functions freely: enter image description here

Benny7500
  • 569
  • 6
  • 16
0

no, they do not talk about JavaScript Functions, they talk about serverless computing functions

https://firebase.google.com/features/functions/

theses functions can make only make http calls to Google Services and e.g. not to Yahoo or Amazon services

Michael Meyer
  • 2,179
  • 3
  • 24
  • 33