App Logo
web.whatsapp.com

WhatsApp — List a chat's media, documents or links

List what has been shared in one WhatsApp chat, from the chat's own media, links and documents gallery — pick which view you want with `tab`. Documents come back with the message id, filename, size, caption and time, so they can be fed straight to download_media. Images and videos are the exception: the gallery does not expose an identifiable handle for them, so those entries return only WhatsApp's own accessible label — use get_conversation when you need to act on a specific photo or video. Links come back with the URL, its preview title and the surrounding message. Reaches further back than the conversation view, whose scrollback is bounded.

Input

name required

Exact chat/contact/group name whose gallery to read (the `name` field from get_inbox).

tab optional

Which view of the gallery to read — these are the three tabs WhatsApp itself offers. One call reads one tab; loop if you need all three.

Default: "media"
count optional

Maximum entries to return, scrolling the gallery to load older ones.

Default: 50

Output

tab required

Which tab was read.

chat required

The chat whose gallery was read, confirmed from the conversation header.

count required

How many entries were returned.

items required

The gallery entries, newest first. Empty when the tab has nothing in it, which is a real answer.

sectionCount optional

The combined media + docs + links total WhatsApp prints on the chat-info section, captured before the gallery opened. Compare it against `count` to tell a genuinely empty tab from one that failed to load.

Start building not clicking