Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling AppEngine from Firebase Functions

I couldn't find any resource about how to call an App Engine Service from a Firebase function
I know I could call it by the URL but in that case it would be an external call and it would apply charges to it.

Besides in every video they say it's posible to access Google API's Did I understand it bad or there is a API call for App Engine?

Thanks!

like image 875
ElBarto Avatar asked Mar 31 '17 17:03

ElBarto


People also ask

How to call a cloud function Firebase?

The Cloud Functions for Firebase client SDKs let you call functions directly from a Firebase app. To call a function from your app in this way, write and deploy an HTTPS Callable function in Cloud Functions, and then add client logic to call the function from your app.

What is the difference between onCall HTTP callable and onRequest HTTP request Functions?

onRequest creates a standard API endpoint, and you'll use whatever methods your client-side code normally uses to make. HTTP requests to interact with them. onCall creates a callable. Once you get used to them, onCall is less effort to write, but you don't have all the flexibility you might be used to.


1 Answers

You cannot access the App Engine service internally, through the private network of your Google Cloud Project. Only specific Products are interconnected in your Virtual Private Cloud, as specified here.

The API for App Engine can have two meanings:

  1. The Google App Engine Admin API - this allows you to manage your App Engine deployments programmatically through a REST API service. All the interactions available through the Console (web browser), and maybe more, are available through these API endpoints. Google's API Explorer is a tool which brings together all available API endpoints for Google services.

  2. You can enable your own API endpoints for the services that you have deployed in your App Engine - this time it is you who defines what will the actual endpoints be and how requests to that endpoints are treated (i.e. by your App Engine app). These are still external calls between Firebase and App Engine. They will go through the Internet.

like image 176
Tudormi Avatar answered Sep 28 '22 09:09

Tudormi