Skip to content

getChats

Sahri Riza Umami edited this page Jul 1, 2018 · 3 revisions

Returns an ordered list of chats.
Chats are sorted by the pair (order, chat_id) in decreasing order. (For example, to get a list of chats from the beginning, the offset_order should be equal to 2^63 - 1).
For optimal performance the number of returned chats is chosen by the library.

getChats(offset_chat_id, limit, offset_order, callback, data)
Field Type Description
offset_order int64 Chat order to return chats from.
offset_chat_id int53 Chat identifier to return chats from.
limit int32 The maximum number of chats to be returned. It is possible that fewer chats than the limit are returned even if the end of the list is not reached.

Example

  • Get an ordered list of chats.

    getChats()

    Response:

    {
      ["@type"] = "chats",
      chat_ids = {
        "-1001099999999",
        "-1001088888888",
        "-1001007777777",
        "-1001033333333",
        "-1001011111111",
        -15678901,
        "-1001390330931",
        456654354
      }
    }

Frequently Asked Questions
The Functions

Clone this wiki locally