未经身份验证调用 Firebase 远程配置 REST API

Calling Firebase Remote Config REST API without auth

我想在移动应用中通过 REST 使用 Firebase 远程配置 API。由于技术限制,我不能使用 Android/iOS SDK 所以我不得不求助于 REST API.

但是,API 需要使用私钥进行身份验证——显然我不能在应用程序中包含该密钥。

此时我不需要任何其他 Firebase 服务,只需要远程配置。

我该如何解决这个限制?我尝试按照 https://firebase.google.com/docs/remote-config/use-config-rest 上的指南进行操作,但如前所述,它需要首先使用身份验证 API.

生成一个短暂的 OAuth2 令牌

根据 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.

因此 REST API 用于 修改 远程配置变量,您也可以在 Firebase 控制台中执行的操作类型。它不适用于 使用 配置变量的常规客户端。为此,您必须使用提供的客户端之一,因为没有 REST API 并且没有记录有线协议。