Firebase Remote Config is a simple way for you to change elements of your app on the fly, just by using the Firebase console. As developers used Remote Config, many of you requested the ability to change these values without having to go through the Firebase console at all. We’re happy to announce that you can now update your Remote Config values directly through the new Remote Config REST API.
The API itself consists of two calls: one to retrieve the current set of Remote Config values from the console, and another to set them. And to be clear, these are designed only for the purpose of setting remote config values without going through the Firebase console. If you want your clients to retrieve these values, they should do so through the native mobile client SDKs.
With this new API, you have the ability to make Remote Config more useful for your team, by creating in-house tools that incorporate specific logic that would be impossible to do from the Firebase console alone. Some examples include:
- Adding sanity checks to values: If you want to give your app designers the ability to tweak values in your in-app economy without accidentally giving away something for free, you could set reasonable sanity checks around some of the values they’re setting within Remote Config. You could also add character limits to strings (to avoid unsightly text overflow errors) or ensure that a string that’s supposed to represent a JSON object is valid parsable JSON.
- Restricting certain actions to some users: Many developers have asked for the ability to allow their marketing team to adjust content like their in-app messaging, while allowing their game designers to adjust gameplay values, without having the two overlap. With the Remote Config API, you can build your own interface to the service that will make it more difficult for a member of your team to accidentally set a value they’re not supposed to touch.
- Creating your own version history: With the REST API, you can create your own version history for Remote Config! Every time you publish a new change to Remote Config via the API, save out the existing Remote Config, either to a local file or a database like Cloud Firestore.
- Scheduling Remote Config updates: By using the REST API in conjunction with a cron job, you can change Remote Config values on a regular schedule. So now you can power a daily message through Remote Config without waking up anybody at midnight to hit the “publish” button.
- Batch importing values: Want to transition from your own proprietary system to Firebase Remote Config? The REST API allows you to do that quickly and easily.
- Using Remote Config with Cloud Functions: You can use Cloud Functions for Firebase (or your own custom server code) in conjunction with the Remote Config API to start 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 this new feature.
…and you’ve probably got a great idea or two we haven’t even thought of yet.
The REST API is available starting today for anybody who wants to use it with their project, so give it a try! As always, if you have any questions about the REST API, or just want to show off some fun new tool you’ve built, please contact us in the Firebase Talk group, or on Stack Overflow.