Back

[SOLVED] The current user is not authorized to perform the requested action.

  • 0
  • Web
Nikky
3 Oct, 2023, 19:26

I have a user collection and Im storing the accountId along with other user details. I want to get the current user's details. I tried to do this by getting the current account then passing the accountId as query in listDocuments.

Problem: It throws The current user is not authorized to perform the requested action.

Im using: Cloud, Client SDK. React

Would appreciate some help. πŸ™

TL;DR
Problem: The user is getting an error message saying "The current user is not authorized to perform the requested action" when trying to get the current user's details using the accountId as a query in listDocuments. Solution: The user needs to add the same permission to the relationship collection. Once this is done, the issue should be resolved.
Drake
3 Oct, 2023, 19:40

do you have a relationship on the collection?

Nikky
3 Oct, 2023, 19:41

Hey @Steven Thanks for the prompt response. Yes I do... Do I need to add the same permission to the other collection?

Nikky
3 Oct, 2023, 19:42

Update: Added same permission to the relationship colection. All good! This is solved πŸ‘

Drake
3 Oct, 2023, 19:44

[SOLVED] The current user is not authorized to perform the requested action.

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