The spam reporting API lets you report messages, contacts, or groups as spam to WhatsApp. Reports are sent asDocumentation Index
Fetch the complete documentation index at: https://whatsapp-rust.jlucaso.com/llms.txt
Use this file to discover all available pages before exploring further.
spam_list IQ stanzas.
Access
Send a spam report directly through the client:send_spam_report
The spam report request containing message details, sender info, and the report flow type.
Contains an optional
report_id returned by the server.Group spam report
Types
SpamReportRequest
| Field | Type | Description |
|---|---|---|
message_id | String | The message ID being reported |
message_timestamp | u64 | Unix timestamp of the message |
from_jid | Option<Jid> | Sender JID |
participant_jid | Option<Jid> | For group messages, the participant who sent it |
group_jid | Option<Jid> | For group reports, the group JID |
group_subject | Option<String> | For group reports, the group name |
spam_flow | SpamFlow | The context in which the report was triggered |
raw_message | Option<Vec<u8>> | Raw protobuf-encoded message bytes |
media_type | Option<String> | Media type of the message (e.g., "image") |
local_message_type | Option<String> | Local message type identifier |
SpamFlow
The context from which the spam report was triggered.| Variant | Wire value | Description |
|---|---|---|
MessageMenu | "MessageMenu" | Report from message context menu (default) |
GroupSpamBannerReport | "GroupSpamBannerReport" | Report from group spam banner |
GroupInfoReport | "GroupInfoReport" | Report from group info screen |
ContactInfo | "ContactInfo" | Report from contact info screen |
StatusReport | "StatusReport" | Report from status view |
SpamReportResult
| Field | Type | Description |
|---|---|---|
report_id | Option<String> | Server-assigned report ID, if returned |
Error handling
The method returnsResult<SpamReportResult, IqError>. Common errors include network failures and server-side rejections.
See also
- Client API - Core client methods
- Blocking - Block and unblock contacts