【发布时间】:2019-05-08 21:59:53
【问题描述】:
我正在尝试通过 Firebase Auth REST API 使用 Google Apps 脚本在 Firebase Auth 上注册用户。
我的代码看起来像这样。
var apiKey = "XXXX";
var url = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=" + apiKey;
var options = {
method: 'post',
contentType: 'application/json',
email: "email@gmail.com",
password: "12345678",
returnSecureToken: true
};
var response = UrlFetchApp.fetch(url, options);
我收到以下错误。
{
"error": {
"code": 400,
"message": "ADMIN_ONLY_OPERATION",
"errors": [
{
"message": "ADMIN_ONLY_OPERATION",
"domain": "global",
"reason": "invalid"
}
]
}
}
我该怎么做?
【问题讨论】:
标签: firebase google-apps-script firebase-authentication