appwrite list users search params


I am trying to use appwrite server sdk list users to get userid from an email.

The documentation says there is a search: option that can be used but no where does it say what the format of that String? is.

What is the format of the search: String? to only get a list of users whose email matches?

void main() { // Init SDK
  Client client = Client();
  Users users = Users(client);

    .setEndpoint(endPoint) // Your API Endpoint
    .setProject(projectID) // Your project ID
    .setKey(apiKey) // Your secret API key

  Future result = users.list(search: '<<<WHAT GOES HERE>>>');


:wave: Hello!

Thanks for bringing this question up, this is definitely not well documented, I’ll note this down and try to make it clearer in the docs, but here’s how you’d approach this in Dart:

  final res = users.list(search: Query.equal('email', 

  res.then((response) {
  }).catchError((error) {

The Query object generates a query string, and works similar to how listDocument would work. The difference here is that it only takes a single query string instead of a list.

Answered By – Vincent Ge

Answer Checked By – Dawn Plyler (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.