[SOLVED] Current User Is Not Authorized To Perform the Requested Action
- 0
- Resolved
- 2
- React Native
- Cloud
I keep getting an error saying the current user is not authorized to perform the requested action, when I'm trying to create a row a table. Permissions have been set for create, read, update and delete for Users on the table in question and I've given the function full auth and database scopes and its not working.
The function does not access storage or messaging.
In order to avoid a code dump, this specific line is where it fails:
const drawEntry = await database.createRow<DrawEntry>({ databaseId: "68c2503d0005d71c2f12", tableId: "draws", rowId: ID.unique(), data: { userId: userId, idm_key: body.idm_key, card: thisDrawAttempt.card, timestamp: now, outcome: "pending", }, transactionId: transaction.$id });
Of note, I fetch userId as follows: const userId = req.headers["x-appwrite-user-id"];
and the transaction is created as: const transaction = await database.createTransaction();
This error is frustrating because I basically can't move forward with the project, and no other tables or functions in the project are giving me this issue despite having similar permissions. Please help.
I'm on appwrite cloud for reference and using node-appwrite 21
Hi, Are you using dynamic key or how are you setting the permissions?
Hi I fixed it by using a dynamic key
[SOLVED] Current User Is Not Authorized To Perform the Requested Action
Recommended threads
- Error With iOS Apps
I keep getting the below errors for my flutter app. The clients are registered and have been. This wasn't an issue a few hours ago. AppwriteException: AppwriteE...
- Backup policies think im on free tier
Cant create more than one policy as im told to ugprade, when clicking upgrade im taken to the upgrade page which confirms im already on pro
- Cant get rid of "get started"
Not that important, but annoying. No matter what I do I cant get the "Get started" to go away, ive added a bunch of web platforms and its just stuck.