Search code examples
firebaserestfirebase-remote-config

Calling Firebase Remote Config REST API without auth


I want to use Firebase Remote Config API via REST in a mobile app. Due to technical limitations, I can't use the Android/iOS SDK so I have to resort to the REST API.

However, that API requires authentication using a private key -- obviously I can't include that key in the application.

I don't need any other Firebase service at this time, just the remote config.

How can I work around this limitation? I tried following the guide at https://firebase.google.com/docs/remote-config/use-config-rest, but as mentioned it requires to first generate a short-lived OAuth2 token using the auth API.


Solution

  • According to the documentation on using the Remote Config REST API:

    This document describes how you can use the Remote Config REST API to read and modify the set of JSON-formatted parameters and conditions known as the Remote Config template.

    So the REST API is for modifying Remote Config variables, the type of action you could also do in the Firebase console. It is not for use in regular clients, which consume the configuration variables. For that you'll have to use one of the provided clients, as there is no REST API and the wire protocol is not documented.