Optional
params: { Additional search parameters
Optional
addAdditional offset from offset, in resulting messages.
This can be used for advanced use cases, like:
MSGID
:
offset = MSGID, addOffset = -20, limit = 20
MSGID
:
offset = MSGID, addOffset = -10, limit = 20
When offset is not set, this will be relative to the last message
Optional
chatChat where to search for messages.
When empty, will search across common message box (i.e. private messages and legacy chats)
Optional
filter?: TypeMessagesFilterFilter the results using some filter (see SearchFilters)
SearchFilters.Empty (i.e. will return all messages)
Optional
fromSearch only for messages sent by a specific user.
You can pass their marked ID, username, phone or "me"
or "self"
Optional
limit?: numberLimits the number of messages to be retrieved.
Optional
maxMaximum message date to return
Optional
maxMaximum message ID to return.
Unless addOffset is used, this will work the same as offset.
Optional
minMinimum message date to return
Optional
minMinimum message ID to return
Optional
offset?: numberOffset ID for the search. Only messages earlier than this ID will be returned.
Optional
query?: stringText query string. Required for text-only messages, optional for media.
Optional
threadThread ID to return only messages from this thread.
Search for messages inside a specific chat