contacts.search

Returns users found by username substring.

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

Name Type Description
q string Target substring
limit int Maximum number of users to be returned

Result

contacts.Found

Possible errors

Code Type Description
400 BOT_METHOD_INVALID This method can't be used by a bot
400 QUERY_TOO_SHORT The query string is too short
400 SEARCH_QUERY_EMPTY The search query is empty
-503 Timeout Timeout while fetching data

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.