我正在将particle.io 用于应用程序,并且我使用数据库密钥使webhook 对实时数据库正常工作。
我正在进行一些更新,我想开始使用 firestore 数据库,但数据库密码不起作用,当我将数据库密码添加到我的通话中时,我不断收到 403 未授权。
有没有办法可以将particle.io与firebase admin SDK一起使用?在我的 Firestore 规则中,我有以下内容,因此只有授权帐户才能访问数据。
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
这是我用来从 webhook 发布的 URL。
https://firestore.googleapis.com/v1beta1/projects/ {projectId}/databases/(default)/documents/{documentName}?key={databasescret}
我从 firebase 上的 API Explorer 获取 URL,但他们使用 OAUTH,并且它与 OAUTH 一起工作得很好,只是我没有从particle.io webhook 中选择 OAUTH。