Back
[Solved] The current user is not authorized to perform the requested action.
- 0
- General
- Auth
- Web
- Cloud
kaushal91
Let me save u some time for this. The only two possible reasons i have found where this error happened to me was
- there was no user session so basically do create a session with whatever way you are using
- and then make sure you have permissions to read the documents on the collection. the catch is that if a collections has some relationship attributes then you will need to make sure the related collection also has the same permissions as the first collection in order to read from it.
Feel free to comment the scenario and solution if you have faced anything different and lets save each other's time :appwritejs:
TL;DR
Issue: Developers receiving error message "The current user is not authorized to perform the requested action."
Solution:
1. Create a user session to resolve the authorization issue.
2. Ensure permissions are set to read documents in the collection.
3. If there are relationship attributes in the collection, ensure related collections have the same permissions.
Feel free to share your own experiences and solutions to help each other! Recommended threads
- Rate Limit of project
AppwriteException: Rate limit for the current endpoint has been exceeded. Please try again after some time. So , how much time I have to wait and why does it h...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...