#[SOLVED] List all users of a project in Appwrite Cloud

1 messages · Page 1 of 1 (latest)

gloomy epoch
lost flint
#

Hey @gloomy epoch

The Users API is a server-side integration that works in an "admin" scope. The Account API is a client side implementation that works in the selected/current user's scope. That being said, you cannot use the Accounts API to get a list of the project's users as user A will not be able to see which other users are in the project.

#

You can create a simple cloud function that returns a list of all the project's users. You can execute this function based on an event, or by using the createExecution endpoint in the Functions API.

#

If you have any issues while implementing this, feel free to tag me and ask away!

gloomy epoch
#

I don't know how to write the cloud function, seems I'll leave out that feature.
Thanks, btw @lost flint

lost flint
#

Might help you understand how they work and how to get started.
Regardless, let me know if you've got any questions 😄

gloomy epoch
#

I think I've found an easier way though. I'll save the ID and user name on the database also after user creation. 😀

lost flint