Deleted users are automatically excluded from search and query results.
Parameters
This page covers two user-list operations. Choose the operation first, then use the inputs table in each section for the exact SDK call shape.Search users by display name
Use search when the user types a display-name keyword. Search keywords must be at least 3 characters long. When a keyword is provided, the server ranks matching results by search relevance; supported sort options can then control the returned order.Selecting which fields to match (searchBy)
By default the keyword is matched against all searchable user fields (display name, user id, and profile handle), so a keyword can surface users that match only by their user id. Provide searchBy to restrict which fields are matched — for example, display name only — so results exclude user-id-only matches.
- Omitting
searchBy(or passing an empty value) keeps the default behavior, so existing integrations are unaffected. - Supported field options:
displayName,userId,profileHandle.
TypeScript types
searchBy as an array of SearchUsersByEnum values, exported from the package root. Plain string literals do not type-check.
Platform support for
searchBy differs. iOS, Android, and TypeScript expose it on user search; Flutter support is not yet available.Inputs
TypeScript search parameters intentionally do not include
sortBy; use getUsers(...) when you need TypeScript user-list sorting.Special character handling
With display-name sorting, users are sorted alphabetically by their display names using ICU collation for the English locale. This means that special characters such as Ä are treated as variants of A. For example, a sorted list might appear as: adam, Älex, Alice, Arthur, charlie, Kristen.When providing a search keyword, the API performs an exact-match lookup for special characters:
- Searching for “Äli” only returns users whose display name contains “Äli”, such as “Älise”.
- Searching for “Alice” does not return “Älice”.
Query users
UsegetUsers() when you need a paginated user list without a display-name keyword. TypeScript query sorting supports firstCreated and lastCreated; iOS, Android, and Flutter also expose display-name sorting.
Inputs
Deleted users are excluded from query results.
Platform notes
searchBy(where supported) restricts which fields the keyword matches; omit it to keep the default behavior of matching all searchable fields (display name, user id, profile handle). Flutter does not yet exposesearchBy.- TypeScript
searchUsers(...)starts a live collection observer, but its search params do not exposesortBy.searchUserByDisplayName(...)is a deprecated alias with the same behaviour. - iOS search and query methods require an
AmityUserSortOption. - Android and Flutter default user search/query sorting to display name when no explicit sort is provided.
- Android takes
searchByas a list —searchBy(listOf(AmitySearchUserBy.DISPLAY_NAME)). Import the enum fromcom.amity.socialcloud.sdk.model.core.search.AmitySearchUserBy; it lives in a different package fromAmityUserSortOptionandAmityUserSearchMatchType(com.amity.socialcloud.sdk.api.core.user.search). - Use pagination controls from the callback, live collection,
PagingData, or FlutterPagingControllerinstead of loading all users at once.
Related topics
Get User Information
Retrieve one user, batch lookup users where supported, or query user collections.
Update User Information
Modify user profile fields.