wx messages
Read or send messages and retrieve their attachments
wx messages get
Show a message by local ID, optionally qualified by chat
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 2 | Message ID from wx messages list, checked to belong to the chat |
<THREAD_OR_ID> | position 1, required | Message ID, or the chat ID when a message ID follows |
wx messages list
List messages in a chat
| Argument or flag | Takes | What it does |
|---|---|---|
<THREAD> | position 1, required | Chat ID from wx chats list |
--cursor | takes <CURSOR> | Continue from the next-page cursor of the previous result |
--limit | takes <LIMIT> | Return at most this many items |
wx messages media
Retrieve a message attachment or report its availability
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 2, required | Message ID from wx messages list |
<THREAD> | position 1, required | Chat ID the message belongs to, from wx chats list |
--cached-only | switch | Use only a copy the daemon has already saved; never start a download |
--detach | switch | Return as soon as the work is queued instead of waiting for it |
--output | takes <OUTPUT> | Save the attachment to this new file; an existing file is not overwritten |
--quality | takes <QUALITY>, default best, values best|thumbnail|standard|original|full|normal|encoded | Copy to retrieve: images have thumbnail, standard and original; videos normal and original; voice encoded. best picks the best available and full means original |
--wait | takes <WAIT>, default 20 | Seconds to wait for the download; it keeps running after the wait ends |
wx messages read
Mark a whole chat read using its current read-state version
| Argument or flag | Takes | What it does |
|---|---|---|
<THREAD> | position 1, required | Chat ID from wx chats list |
--expected-version | required, takes <EXPECTED_VERSION> | Read-state version from wx chats get; refused if the chat changed since |
wx messages recall
Recall an own message using its opaque local ID and exact remote ID
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 1, required | Message ID from wx messages list —json (the id field) |
--detach | switch | Return as soon as the work is queued instead of waiting for it |
--idempotency-key | takes <IDEMPOTENCY_KEY> | Reuse this key when retrying so the daemon applies the request only once |
--server-id | required, takes <SERVER_ID> | Exact server ID of the message, from wx messages list —json (serverId) |
--wait | takes <WAIT>, default 30 | Seconds to wait for completion; the work keeps running after the wait ends |
wx messages send
Send text, a URL share, a contact card, an image, a file, a video or a voice note
| Argument or flag | Takes | What it does |
|---|---|---|
<THREAD> | position 1, required | Chat ID to send to, from wx chats list |
--contact-card | takes <CONTACT_ID> | Send a contact card for a contact ID, Official Account ID, or “self” |
--description | takes <DESCRIPTION> | Description shown on the shared link card |
--detach | switch | Return as soon as the work is queued instead of waiting for it |
--file | takes <FILE> | Send this file as an attachment |
--idempotency-key | takes <IDEMPOTENCY_KEY> | Reuse this key when retrying so the daemon applies the request only once |
--image | takes <IMAGE> | Send this image file |
--image-quality | takes <IMAGE_QUALITY>, values standard|original | Send a compressed image (default), or include its full-resolution original |
--mention | takes <MENTION>, repeatable | Mention a group member by account ID; repeat for multiple members |
--mention-all | switch | Mention all group members (WeChat enforces the account’s permissions) |
--quote-message-id | takes <QUOTE_MESSAGE_ID> | Quote a stored message in this chat; also supply its exact server ID |
--quote-server-id | takes <QUOTE_SERVER_ID> | Exact server ID of the quoted message; use it with —quote-message-id |
--share | takes <SHARE> | Send this URL as a shared link card; —title is required |
--text | takes <TEXT> | Send this text message |
--thumbnail-url | takes <THUMBNAIL_URL> | Thumbnail image URL shown on the shared link card |
--title | takes <TITLE> | Title shown on the shared link card |
--video | takes <VIDEO> | Send this MP4 video file |
--video-quality | takes <VIDEO_QUALITY>, values normal|original | Prepare normal playback, or include the unchanged original video too |
--voice | takes <VOICE> | Send this audio file as a voice message |
--wait | takes <WAIT>, default 30 | Seconds to wait for the send to finish (up to 3600 for attachments, 900 otherwise) |
wx messages send-status
Show an outgoing send by ID
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 1, required | Send ID printed by wx messages send |
wx messages sends
Inspect or cancel sends, or find a send by its idempotency key
wx messages sends cancel
Request cancellation of an outgoing send
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 1, required | Send ID printed by wx messages send |
wx messages sends get
Show an outgoing send by ID
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 1, required | Send ID printed by wx messages send |
wx messages sends lookup
Find an outgoing send by its original idempotency key
| Argument or flag | Takes | What it does |
|---|---|---|
--idempotency-key | required, takes <IDEMPOTENCY_KEY> | Key that was given when the send was submitted |
wx messages sync
Fetch new messages for the selected account
wx messages voice
Inspect or cancel outgoing voice jobs
wx messages voice cancel
Request cancellation of an item by ID
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 1, required | ID printed when the job, operation or login attempt was started |
wx messages voice get
Show the current result and state of an item by ID
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 1, required | ID printed when the job, operation or login attempt was started |
wx messages voice retry
Retry an eligible failed item by ID
| Argument or flag | Takes | What it does |
|---|---|---|
<ID> | position 1, required | ID printed when the job, operation or login attempt was started |
--reuse-completed-upload | switch | Reuse a completed file upload whose message submission never started |
wx messages watch
Stream message events, optionally saving a resume cursor
| Argument or flag | Takes | What it does |
|---|---|---|
--after | takes <AFTER> | Start after this event cursor, such as the last one you processed. Without it, the watch resumes from —cursor-file or starts from the newest event |
--cursor-file | takes <CURSOR_FILE> | Save the last event cursor to this private file and resume from it next time |