telegram api method · layer 229 · #1bbcf300
messages.getSearchCounters
Get the number of results that would be found by a messages.search call with the same parameters
definition
messages.getSearchCounters#1bbcf300 flags:# peer:InputPeer saved_peer_id:flags.2?InputPeer top_msg_id:flags.0?int filters:Vector<MessagesFilter> = Vector<messages.SearchCounter>;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
peer | InputPeer | Peer where to search |
saved_peer_id | InputPeer | Search within the saved message dialog » with this ID. |
top_msg_id | int | If set, consider only messages within the specified forum topic |
filters | Vector<MessagesFilter> | Search filters |
returns
Vector<messages.SearchCounter>
errors (3)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
history
present in layers 100–229 · constructor id changed 2×
| id | layers |
|---|---|
| #732eef00 | 100–147 |
| #00ae7cc1 | 148–169 |
| #1bbcf300 | 170–229 |