Ifan 767
Ifan 767

Reputation: 512

Do I have to call Firebase Remote Config API from the Cloud Function?

I have some params in Remote Config that I want to update from the Google Cloud Functions.

Should I use the Remote Config API when both Cloud Functions and Remote Config belong to the same account or project?

I am asking because Cloud Functions can directly import the data from Firestore without any authentication and API.

Upvotes: 0

Views: 1137

Answers (2)

Fang Lai
Fang Lai

Reputation: 139

Remote Config provided the RESTful APIs to update the parameters or template.

You don't have to call them from a Google Cloud function. But calling them from a Google Cloud function or even Firebase Cloud function is definitely workable.

You can even call the RESTful APIs from postman or some other tools once you set up the call properly.

Check more details here: https://firebase.google.com/docs/reference/remote-config/rest

Upvotes: 1

Osvaldo
Osvaldo

Reputation: 519

With Remote Config backend APIs, you could use Remote Config with Cloud Functions for Firebase, changing values in your app based on events that happen server-side. For example, you can use Remote Config to promote a new feature in your app, and then turn off that promotion automatically once you detect enough people have interacted with the new feature.

enter image description here

Using the Remote Config REST API or the Admin SDKs described in this guide, you can bypass managing the template in the Firebase console to directly integrate Remote Config changes into your own processes.

As described here, Cloud Functions can be triggered in response to changes in Firebase Remote Config in the same Cloud project as the function. This makes it possible to change the behavior and appearance of your app without publishing an app update.

Upvotes: 0

Related Questions