Searches for users or rooms that are visible to the user. It will only return rooms that user didn't join yet.
If the Allow Anonymous Read setting is enabled, anonymous callers can use this endpoint to resolve public channels through the navbar search.
Changelog
| Version | Description |
|---|---|
| 8.6.0 | Added usernames, type, and rid query parameters, and allowed anonymous read when Allow Anonymous Read is enabled. |
| 0.64.0 | Added support to '#' and '@' searches, for channels and users respectively. |
| 0.61.0 | Added |
The authToken of the authenticated user.
The userId of the authenticated user.
The term to be searched. Supports '#' for channels and '@' for users
Comma-separated list of usernames to exclude from the user results.
Restricts the search to a single result type. Accepts users or rooms.
The room ID to scope the user search to a specific room.
OK
{
"users": [
{
"_id": "rocket.cat",
"name": "Rocket.Cat",
"username": "rocket.cat",
"status": "online",
"avatarETag": "5BB9B5ny5DkKdrwkq"
}
],
"rooms": [],
"success": true
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}