Skip to main content

Searching users

Through the WireApplicationManager you can search for Wire users by name or handle.

WireUser

The searchUsers method returns a List<WireUser> where each WireUser contains:

  • id — The user's qualified identity (QualifiedId with UUID + domain)
  • name — The user's display name
  • handle — The user's unique handle/username (if available)
  • teamId — The UUID of the team the user belongs to (if available)
  • email — Not populated in search results
  • deleted — Not populated in search results

Use Case: Search for a user by name

val applicationManager = wireAppSdk.getApplicationManager()

val results: List<WireUser> = applicationManager.searchUsersSuspending(
query = "Alice",
domain = "wire.com",
numberOfResults = 25
)

results.forEach { user ->
println("Found: ${user.name} (@${user.handle})")
}

About search results

The search query is automatically normalized before matching. This means that:

  • All characters are converted to lowercase
  • Diacritical marks (accents) are removed

For example:

  • "Björn""bjorn"
  • "Álice""alice"

This makes searches more flexible and user-friendly, especially for international names and handles.

Matching users are returned in the following priority order:

  1. Users whose normalized full handle exactly matches the query
  2. Users whose normalized full display name exactly matches the query
  3. Users whose normalized handle starts with the query
  4. Users whose normalized display name starts with the query

This ranking helps ensure that the most relevant results appear first.