@wppconnect/wa-js - v3.20.1
    Preparing search index...

    Function reportContact

    • Report a contact or chat to WhatsApp

      This function allows you to report contacts for spam, inappropriate behavior, or other violations.

      Available spam flow types:

      • 'ChatInfoReport' (default) - Report from chat info screen
      • 'MessageMenu' - Report from message menu
      • 'GroupInfoReport' - Report from group info screen
      • 'ChatFmxCardSafetyToolsReport' - Report from safety tools (trusted)
      • 'ChatFmxCardSafetyToolsReportSuspicious' - Report suspicious contact
      • 'GroupInfoLeaveReportUpsell' - Report when leaving group

      Parameters

      • contactId: string | Wid

        Contact ID or Wid to report

      • spamFlow: string = 'ChatInfoReport'

        Optional spam flow type (default: 'ChatInfoReport')

      • Optionalmsg: MsgModel

        Optional specific message to report

      Returns Promise<ReportContactResult>

      Promise with report result containing reportId or error details

      // Basic contact report
      const result = await WPP.contact.reportContact('5511999999999@c.us');
      console.log('Report ID:', result.reportId);
      // Report with specific type
      await WPP.contact.reportContact('5511999999999@c.us', 'ChatFmxCardSafetyToolsReportSuspicious');
      // Report specific message
      const msg = await WPP.chat.getMessageById('msgId');
      await WPP.contact.reportContact('5511999999999@c.us', 'MessageMenu', msg);