Chats and contacts
line chats
line chats --search "Family"
line chats --unread
line chats --all --limit 50
line chats --show-ids
line contacts
line contacts --search "Alice"chats lists your conversations and contacts lists your friends. Both show 20
results; --limit N changes that and --limit 0 shows everything. JSON output
includes every match unless you set --limit. chats --all adds inactive
conversations.
chats --unread keeps chats whose unread count, as LINE reports it, is above
zero. It works with --search, --limit, --all, --show-ids, --json, and
--details. Chats where LINE leaves out the count are skipped, because a
missing count doesn't prove there are unread messages. Listing unread chats
never marks anything as read; line read does that.
Naming a chat#
Wherever a command takes CHAT, you can use a full contact, room, or group ID,
or a name that matches exactly one chat (not case-sensitive). Quote names that
contain spaces.
In a terminal, a name that matches no chat exactly, or several, opens a chooser
of chats and contacts whose names contain it. Nothing is sent or changed until
you pick one. Without a terminal (scripts, --json, --stdin), the command
fails instead and lists up to five similar names with their full IDs. A partial
or similar name is never used for a send or other change unless you chose it.
Scripts should use IDs, because names can change.
Look up other people#
To look up someone who isn't in your friend list, use their full user MID, their
public LINE ID (--userid), or their international phone number (--phone):
line contacts --mid USER_MID
line contacts --mid FIRST_USER_MID --mid SECOND_USER_MID --json
line contacts --userid @alice --json
line contacts --phone "+81 9012345678" --json
line contacts --blocked --show-ids
line contacts block USER_MID
line contacts unblock USER_MID --json--mid: repeat it for each person. Only those IDs are looked up, in the order given, with exact duplicates removed, and every requested ID is shown. Use a full user MID, not a group or room ID, display name, or public LINE ID. Accepted forms are legacyuplus 32 lowercase hex digits, and currentuorUplus 43 base64url characters.--userid: an optional leading@is removed and the ID is lowercased.--phone: takes an international number starting with+, such as+819012345678or"+81 9012345678".- None of these add anyone as a friend. If LINE finds no matching user,
--useridand--phoneexit 1 (not_foundwith--error-format=json). --blocked: lists blocked contacts and blocked recommendations, with names where available. It works in--read-onlymode.contacts blockandcontacts unblock: take a full user MID (never your own account or a group or room ID). Each reserves a saved request sequence, is attempted once, and is refused in--read-onlymode.
--mid, --userid, --phone, and --blocked can't be combined with each
other, --search, or --limit. For script output, see
Contact lookup JSON.
How names are shown#
Every MID is shown with its name. Your custom contact name wins over the
profile name. (unavailable) means LINE didn't return that profile;
(name unavailable) means LINE returned a profile without a usable name.
Neither tells you whether the account was deleted.
Legacy multi-person rooms (IDs starting with r) appear in chats; a room
without a name gets one built from its members. If LINE's regular contact lookup
leaves out an official or business account, chats, contacts,
messages --details --resolve-names, and watch look up its name from the
account's profile instead.