Search code examples
javascriptreactjsfirebasefirebase-remote-config

Firebase Remote Config API from React


I'm using React and im trying to use this API https://firebase.google.com/docs/reference/remote-config/rest/v1/projects/getRemoteConfig to get my Remote Config.

using https://github.com/firebase/firebase-js-sdk for it does not meet my requirements because they have a bug with the Remote Config so i'm trying to use the API directly (from the docs above)

can anyone show me how i call this API ?

according to the Docs im suppose to call:

GET https://firebaseremoteconfig.googleapis.com/v1/{project=projects/*}/remoteConfig

what is {project=projects/*} ?

also how do i suppose to pass my APIKey or something? (like how to authenticate to use this API?)

using only HTTPS / HTTP calls

Thanks~


Solution

  • The API you're trying to call is meant for server-side access only, and not for access from within your (native or web) app. Calling it from within your app, exposes you users to abuse.

    Aside from that: