我使用python script将我的firebase远程配置数据转换为json文件。我的问题是,在我设置service account之后,我仍然得到授权错误。我的服务帐户的角色已设置为"Firebase远程配置管理员“。即使作为“所有者”,我仍然得到授权错误。
{
"error": {
"code": 403,
"message": "[AUTHORIZATION_ERROR]: User does not have the following permission: GET_TEMPLATE",
"status": "PERMISSION_DENIED"
}
}有什么建议可以通过授权来检查吗?
发布于 2020-06-17 03:16:37
firebase和google存储的服务账户基本上是不同的。
如果您尝试使用普通服务帐户获取模板,则会失败
因此,您必须按照以下步骤生成firebase服务帐户
To generate a private key file for your service account:
In the Firebase console, open Settings > Service Accounts.
Click Generate New Private Key, then confirm by clicking Generate Key.
Securely store the JSON file containing the key.欲了解更多详情,请访问以下链接:https://firebase.google.com/docs/remote-config/automate-rc#get_an_access_token_to_authenticate_and_authorize_api_requests
简而言之,要设置firebase服务帐户,请转到如下url (替换your_project_name)
https://console.firebase.google.com/project/your_project_name/settings/serviceaccounts/adminsdk
希望这对某些人有帮助。
https://stackoverflow.com/questions/60162108
复制相似问题