Skip to content

Channel: WhatsApp Adapter (Baileys) #10

@ggondim

Description

@ggondim

Summary

Implement a custom WhatsApp channel adapter using Baileys (WhatsApp Web protocol library). This is the most complex adapter due to Baileys session management and WhatsApp's limited interactive message support.

Tasks

  • Integrate Baileys library for WhatsApp Web protocol
  • Inbound: messages (text, media), replies
  • Outbound: text, buttons (WhatsApp interactive messages — max 3 buttons), lists
  • Thread support: virtual threads via quoted replies
  • A2H inline (method 1): limited — WhatsApp buttons for simple AUTHORIZE (max 3 options)
  • A2H fallback: most COLLECT intents → method 3 (external form) due to platform limitations
  • Response capture (method 2): quoted reply messages
  • Session management: QR code auth flow, reconnection logic, session persistence
  • Report capabilities: { threads: false, buttons: true (limited), selectMenus: false, replyMessages: true, dms: true, fileUpload: true }

Acceptance Criteria

  • Adapter implements full ChannelAdapter interface
  • QR code auth flow works for initial setup
  • Session survives restarts (persistent auth state)
  • Reconnection handles disconnects gracefully
  • A2H AUTHORIZE with ≤3 options renders as WhatsApp buttons
  • A2H COLLECT falls back to method 3 correctly
  • Passes shared adapter conformance test suite

Dependencies

Known Risks

  • Baileys is an unofficial library; WhatsApp may break compatibility
  • WhatsApp business API is an alternative but requires Meta approval

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions