Skip to content
Back

Getting error in Database client SDK even if the operation is successfull

  • 0
  • Cloud
Manik2375
9 Sep, 2025, 17:39

So, here's the code

TypeScript
    try {
      const name = email.split("@")[0];
      const userID = ID.unique();
      await account.create({
        userId: userID,
        email,
        password,
        name,
      });
      await tablesDB.createRow({
        databaseId: DATABASE_ID,
        tableId: "users",
        rowId: userID,
        data: {
          name,
          email,
        }
      });
    } catch (error: unknown) {
      console.log(error);
      if (typeof error === "object" && error) {
        throw (error as AppwriteException).message;
      } else throw error;
    }```

Here, on adding row to table, I am getting error `[AppwriteException: The current user is not authorized to perform the requested action.]` even though, on dashboard, the data is being added successfully
My permissions for `users` table is (pfa)

I'm not sure how to fix this
TL;DR
Code is successfully adding data to the database but encountering a permission error. Check the permission settings for the `users` table in the dashboard. Make sure the current user has the necessary permissions to write to the table. If the data is being added successfully, it might be a casing issue or you're looking at the wrong database.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more