# searchContact2
Version: 4.3.0+
Description: searching for contacts on the server.
Search results are cached. The cache record lifetime is 5 minutes.
In response to this command, the cached result and the search result from the personal address book will be returned. If there is no result in the cache for the current request, then a contact search will be performed on the server.
The search result from the server will arrive via a notification - contactsSearched.
Request example:
{
"method" : "searchContact2",
"requestId" : "1",
"searchingString" : "us"
}
Response example:
{
"method": "searchContact2",
"requestId": "1",
"foundContacts": [
{
"peerId": "user1@some.server",
"displayName": "U1",
"isInAbook" : true
},
{
"peerId": "user2@some.server",
"displayName": "U2",
"isInAbook" : true
},
{
"peerId": "user3@some.server",
"displayName": "U3",
"isInAbook" : true
}
],
"result": true
}
Parameter description:
searchingString
- the string that will be used for the searchrequestId
- unique request identifierfoundContacts
- list of found contactspeerId
- unique identifier of the found contactdisplayName
- the display name of the found contactisInAbook
- a flag indicating the presence of a contact in the address book
See also: