
User A with a label (x) is creating a document and wants to give read permission to user B with a label (y) while creating the document. returning 401
[ Permission.read(Role.user(B)),
Permission.read(Role.user(A)),
Permission.delete(Role.user(A)) ]

any help fellas

A project user can only grant permissions to a resource that they own. For example, if a user is trying to share a document with a team that they are not a member of, they will encounter a 401 not authorized error. If your app needs users to grant access to teams they're not a member of, you can create Appwrite Functions with a Server SDK to achieve this functionality.

but that part regarding teams, not label or is it the same? in this case, User A is the owner of the document and he want to share with other user.

ehhh i guess the docs needs to be updated.
A user can only grant permissions they have.
Recommended threads
- "The document data is missing. Try again...
Hello, I am getting this error suddenly. I have been using this service for a year now, and I haven't made any changes to my code since then. My app was workin...
- Error: The document data is missing. Try...
I am not able to create any document on some of the collection/ DBs. As I can see many of us facing the same issue, need a quick resolution from the Appwrite Te...
- Appwrite Error: 401 Unauthorized on getC...
Hi everyone, I'm getting an error while trying to fetch the current user using Appwrite in my React project. Here's the error log: auth.js:41 GET https://fra....
