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~
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:
To learn about the process in a more readable way than the reference docs, I recommend reading the guide on modifying remote config templates through the REST API.
The {project=projects/*}
in the URL indicates what project to get the Remote Config template from. So if your Firebase project ID is myproject
, this would be {project=projects/myproject}
.