Skip to main content

Connect WhatsApp API in 2 Minutes (Official WAHA)

Corebeginner2 minutes6 min read

Connect your WhatsApp Business account to unlock automation, bulk messaging & lead capture. Official WAHA integration. 2-minute setup.

In 2 minutes, you'll unlock automated customer support, lead generation, and bulk messaging for 2 billion WhatsApp users. While competitors rely on sketchy unofficial APIs that risk instant bans, MoltFlow uses the official WAHA integration trusted by enterprises worldwide. By the end of this guide, you'll have a working WhatsApp Business automation connection — no technical expertise required.

What You'll Need

Before starting, make sure you have:

  • A MoltFlow account — The free plan works perfectly for getting started. Sign up here if you haven't already.
  • WhatsApp on your phone — This can be regular WhatsApp or WhatsApp Business. Make sure it's updated to the latest version.
  • 2 minutes — That's all it takes.

Important: If your WhatsApp account is already connected to WhatsApp Web or another automation service, you'll need to unlink it first (see Troubleshooting section below).

Step 1: Log In to Your MoltFlow Dashboard

After creating your account and logging in, you'll land on the main dashboard. Look for the Sessions link in the left sidebar and click it.

This takes you to the WhatsApp Sessions page, where you'll manage all your connected WhatsApp accounts. If this is your first time, the page will be empty — that's normal.

Step 2: Create a New WhatsApp Session

Click the "Create Session" button in the top-right corner of the Sessions page.

A modal dialog will appear asking for a session name. This is just for your reference — pick something descriptive like "Personal Account" or "Business Support Line" depending on which WhatsApp number you're connecting.

Type your session name and click Create.

MoltFlow will immediately start initializing the connection. This takes 5-10 seconds.

Step 3: Scan the QR Code with Your Phone

Once initialization completes, you'll see a QR code appear on screen. The session status will show "SCAN QR CODE" in an orange badge.

Now grab your phone:

  1. Open WhatsApp on your phone
  2. Tap the three-dot menu (Android) or Settings (iPhone)
  3. Select "Linked Devices"
  4. Tap "Link a Device"
  5. Point your phone's camera at the QR code on your screen

WhatsApp will scan the code and establish the connection. This happens almost instantly.

What's Happening Behind the Scenes

When you scan the QR code, WhatsApp creates a secure encrypted session between your phone and MoltFlow's servers. This session:

  • Uses end-to-end encryption (WhatsApp's security protocol)
  • Stays active even when your phone is offline (after initial sync)
  • Can be revoked anytime from WhatsApp's "Linked Devices" menu

You'll see the status badge transition through these states:

  1. STARTING (gray) — Session is initializing
  2. SCAN_QR_CODE (orange) — Ready for QR scan
  3. WORKING (green) — Connected and ready to use

If you don't scan the QR code within 60 seconds, it expires and you'll need to refresh (see Troubleshooting).

Step 4: Verify the Connection Is Working

Once the status badge turns green and shows "WORKING", your WhatsApp account is connected. Congratulations!

Let's verify everything works by checking the session status via the API:

bash
curl -X GET https://apiv2.waiflow.app/api/v2/sessions/{session_id} \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Replace {session_id} with your actual session ID (visible in the Sessions list) and YOUR_API_TOKEN with your JWT token from the dashboard.

You should see a JSON response with "status": "working".

Test Sending a Message

Want to go one step further? Send a test message to yourself:

bash
curl -X POST https://apiv2.waiflow.app/api/v2/messages/send \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "YOUR_SESSION_ID",
    "phone": "1234567890",
    "message": "Hello from MoltFlow! My automation is working."
  }'

Replace YOUR_SESSION_ID with your session ID and 1234567890 with your own phone number (format: country code + number, no plus sign or spaces).

Check your phone — you should receive the message within seconds.

Why MoltFlow's WhatsApp API Connection Matters

Unlike sketchy third-party APIs, MoltFlow uses the official WAHA (WhatsApp HTTP API) protocol — the same technology WhatsApp Business API customers use. This means:

  • No ban risk — Your connection follows WhatsApp's official guidelines
  • End-to-end encryption — All messages use WhatsApp's native security protocol
  • Field-level encryption — MoltFlow adds an extra layer, encrypting sender details at rest (competitors store plaintext)

This secure foundation is why 500+ businesses trust MoltFlow for mission-critical WhatsApp automation.

Troubleshooting

QR Code Expired

Problem: The QR code disappeared or shows "Expired".

Solution: Click the Refresh button next to the session name. A fresh QR code will appear. You have 60 seconds to scan it.

Status Shows "FAILED"

Problem: The session status badge shows "FAILED" (red).

Solution: Something went wrong during initialization. Click the session name to open details, then click Restart Session. This will regenerate the QR code and start fresh.

"Already Linked" Error

Problem: WhatsApp says the account is already linked to another device.

Solution: WhatsApp only allows up to 4 linked devices at once. Open WhatsApp on your phone, go to Linked Devices, and unlink an old device. Then try scanning the QR code again.

Session Disconnects After a Few Days

Problem: The status changes from "WORKING" back to "STOPPED" or "FAILED" after a few days.

Solution: This usually happens if your phone loses internet connection for an extended period (48+ hours). Make sure your phone stays connected to the internet. If it disconnects, just restart the session and scan the QR code again — your automation settings will be preserved.

What's Next?

Now that your WhatsApp account is connected, you're ready to:

All of these features are available right now in your MoltFlow dashboard. Explore the sidebar to see what's possible.

Ready to unlock automation, AI agents, and group monitoring? Join 500+ businesses automating WhatsApp with MoltFlow. Start your 14-day Growth trial — no credit card required.


Still stuck? Contact support via the dashboard chat or email us at [email protected]. We typically respond within 2-4 hours.

Ready to automate your WhatsApp?

Start for free — set up in under 2 minutes.