Skip to content
Sites Hackathon is live / Aug 29 - Sep 12
Back

Cant retrieve data

  • 0
  • React Native
vlado
2 Sep, 2025, 15:11

i cant retrieve my data

TL;DR
Developers are having trouble retrieving data from a database, despite having the correct permissions and relationships set up. They suggest creating a new row and using `getRow` for debugging in the console, checking if user IDs match, and verifying collection and document settings through screenshots. The error message indicates authorization issues. Consider checking and adjusting the query parameters, ensuring it aligns with the user's permissions and data access restrictions.
vlado
2 Sep, 2025, 15:11

@Kenny

vlado
2 Sep, 2025, 15:11

error getting data in tasks: AppwriteException: The current user is not authorized to perform the requested action.

vlado
2 Sep, 2025, 15:11
vlado
2 Sep, 2025, 15:11

this is how im creating the row

vlado
2 Sep, 2025, 15:11

and the id is correct, i log it right before creating the row

vlado
2 Sep, 2025, 15:12

this fails

vlado
2 Sep, 2025, 15:13

maybe i should do something like this?

vlado
2 Sep, 2025, 15:13

[Query.equal("creator", userId)]

vlado
2 Sep, 2025, 15:13

ill try

Kenny
2 Sep, 2025, 15:14

You shouldn't have to do anything like this. The user should only get data they have access to

vlado
2 Sep, 2025, 15:14

yea still doesnt work

Kenny
2 Sep, 2025, 15:15

can you show a screenshot of your collection settings and the document settings?

vlado
2 Sep, 2025, 15:16

collection:

vlado
2 Sep, 2025, 15:16

row:

vlado
2 Sep, 2025, 15:16

idk what else to show you tbh

Axistro
2 Sep, 2025, 15:18

Console log current user id Check if both are same

vlado
2 Sep, 2025, 15:19

yes they are

Axistro
2 Sep, 2025, 15:20

Try creating a new row In the console And use getRow for debugging

Kenny
2 Sep, 2025, 15:32

Do both your db tasks and db tests fail? Do they both have these exact permissions? Do you have any relationships?

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