Reference Commands

line download

Download an image, video, audio, file, or album preview thumbnail (up to 20 MiB). Use line messages CHAT --details --json to discover message IDs and album preview counts. Existing files are never overwritten. Encrypted media is verified before the first byte is written.

Usage#

Terminal
line download CHAT --message ID --output PATH [--preview N] [--json]
line download CHAT --message ID --output - [--preview N] | COMMAND

Target#

OptionDescription
--message IDattachment or album message ID (lookup: up to 10 pages / 1000 records / 30s)
--preview N1-based album thumbnail index (defaults to 1 when omitted)

Output#

OptionDescription
--output PATHdestination path (never overwritten), or - for binary stdout
--jsonwrite JSON summary

Request#

OptionDescription
--timeout DURATIONcommand deadline including preparation, e.g. 30s; 0 disables it (default 2m0s)

Examples#

Terminal
line download "Alice" --message MESSAGE_ID --output ./photo.jpg
line download "Weekend Trip" --message ALBUM_MSG_ID --preview 2 --output ./thumb.jpg
line download CHAT_ID --message MESSAGE_ID --output - | consumer