-
-
Notifications
You must be signed in to change notification settings - Fork 683
Description
First of all, thank you for doing great job with Dexie Cloud!
I'm running into some issues with adding members using Dexie Cloud and the REST API. I found a resolved issue online that seemed relevant, but when I follow the steps exactly, I still get errors. Here's how I'm trying to reproduce it.
Create a new database.
npx dexie-cloud create
Obtain a token and send the following request. Using rlm-public in this experiment.
### Add members
POST {{baseUrl}}/all/members HTTP/1.1
Content-Type: application/json
Authorization: Bearer {{token}}
[{
"realmId": "rlm-public",
"email": "[email protected]",
"userId": "[email protected]",
"accepted": true,
"invite": false,
"permissions": {},
}]
When the token is obtained with ["ACCESS_DB", "GLOBAL_WRITE"], I get HTTP/1.1 403 Forbidden. Not authorized to mutate any data.
When the token is obtained with ["ACCESS_DB", “GLOBAL_READ”, "GLOBAL_WRITE"], I get HTTP/1.1 404 Not Found. Table 'members' was not found in database '<id>'.
However, the following GET of members returns success withHTTP/1.1 200 OK [].
### Get members
GET {{baseUrl}}/all/members HTTP/1.1
Authorization: Bearer {{token}}
Any ideas on what's happening?