App Logo
web.telegram.org

Telegram — List conversations

List the conversations in the Telegram Web chat list, newest first: each one's name, its peer id (the handle every other Telegram script uses to open it), the last message preview, the time shown on the row, and the unread count. Scrolls to load older conversations up to the requested count. Returns an empty list when the account has no conversations, which is a real answer rather than a failure.

Input

count optional

Maximum conversations to return, scrolling the chat list to load older ones.

Default: 30

Output

chats required

Conversations in the order the chat list shows them (most recent activity first). Empty when the account has none.

count required

How many conversations were returned.

state required

"ready" when the chat list rendered rows. "empty-or-syncing" when the app shell mounted but no rows appeared, which is how an account with no conversations looks - report it rather than treating an empty list as a failure. Being signed out throws instead, so it can never be confused with either.

Start building not clicking