contacts.search #

Returns users found by username substring.

Layer 223

contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found;
---functions---
contacts.search#11f812d8 q:string limit:int = contacts.Found;

Parameters #

NameTypeDescription
qstringTarget substring
limitintMaximum number of users to be returned

Result #

contacts.Found

Notes #

This method will exclude the current user's contacts from the search results. It is assumed that searches among the user's contacts can be handled locally by the client.

Only users can use this method #

Possible errors #

CodeTypeDescription
400QUERY_TOO_SHORTThe query string is too short.
400SEARCH_QUERY_EMPTYThe search query is empty.