Skip to main content
Evolution API v2, a self-hosted WhatsApp REST gateway built on Baileys. Outbound: REST with the apikey header. Inbound: the instance webhook, authenticated with a shared secret header or Evolution’s jwt_key (HS256 JWT).

Install

Usage

  • start() checks the instance; when it is not paired, the QR or pairing code arrives in the connection update (authPayload).
  • LID/PN twins sent by Evolution are reconciled before emitting; pass identityPersistence to keep ids stable across restarts.
  • Polls, reactions, edits (text), typing and read receipts; buttons, lists and cards degrade to numbered text; template is rejected, and so is a poll WhatsApp cannot carry (fewer than 2 or more than 12 options, empty or repeated ones).
  • If Evolution stops offering QR codes before the number is paired (QRCODE_LIMIT), the connection update is closed with reason sessionInvalid: call start() again for a new QR.
  • Keep the instance webhook’s webhookByEvents off: with it, Evolution adds the event name to the URL and an exact-path route answers 404.

Next steps

  • Channels: choosing a channel, the capability matrix and the cross-channel contract.
  • WPPConnect: the other self-hosted gateway, sharing @botmesh/wa-gateway-kit.
  • Webhook server: mount the provider with @botmesh/server.
  • Package README