Back

Fetch users details from backend

  • 0
  • Users
dammy
14 May, 2023, 20:47

How do I fetch lists of users to backend to my Admin dashboard. What function or class does that

TL;DR
The user wants to fetch user details from the backend to populate their admin UI. They are unsure of which function or class to use. The solution is to use the users API provided by appwrite.io and create a function where the admins have access to execute the function, which will call the users API. This ensures that the API key is not exposed.
dammy
14 May, 2023, 21:21

Fetch users details from backend

Drake
15 May, 2023, 00:44

You would use the users API: https://appwrite.io/docs/server/users

If you're exposing this in an app you're making, I would suggest creating a function where your admins have access to execute the function and then the function will call the users API. This way, you won't expose the API key

dammy
15 May, 2023, 02:50

It seems I got you right

dammy
15 May, 2023, 03:05

Must I create a execute function?

I'm yet to be able to execute cloud functions, the one I wanted deploying

Drake
15 May, 2023, 03:06

Sorry I don't understand

dammy
28 May, 2023, 18:28

How do I get every user that created an account.

I want to use that to populate admin UI with lost of users

Drake
28 May, 2023, 18:30

Yes, it's best to expose this using a function

dammy
28 May, 2023, 18:31

what function does that?

Drake
28 May, 2023, 18:51
dammy
28 May, 2023, 18:57

Ok

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