DEV Community

Cover image for Build a WhatsApp Bot in 5 Minutes with Omdaa API
Omdaa API
Omdaa API

Posted on • Originally published at omdaa.com

Build a WhatsApp Bot in 5 Minutes with Omdaa API

WhatsApp is where your customers already are. In this tutorial you will send your first message and set up webhooks using Omdaa API — a developer-friendly WhatsApp Business platform that is free forever.

Full version also on omdaa.com blog

Why Omdaa?

Step 1: Create an account

Sign up free at omdaa.com/register — everything stays free, no subscription.

Step 2: Install the SDK

npm install omdaa-api-client
Enter fullscreen mode Exit fullscreen mode

Step 3: Get your API key

From the dashboard: Settings → API Keys → Create key. Copy it to your environment:

export OMDAA_API_KEY=your-api-key-here
Enter fullscreen mode Exit fullscreen mode

Step 4: Connect a WhatsApp session

Open Dashboard → Sessions, create a session, and scan the QR code with WhatsApp on your phone. Note the sessionId (e.g. default).

Step 5: Send your first message

const { OmdaaClient } = require('omdaa-api-client');

const client = new OmdaaClient({
  apiKey: process.env.OMDAA_API_KEY,
});

async function main() {
  const res = await client.messages.sendText({
    sessionId: 'default',
    to: '201234567890', // country code + number, no +
    message: 'Hello from Omdaa API! 🚀',
  });
  console.log('Sent:', res.data?.messageId);
}

main().catch(console.error);
Enter fullscreen mode Exit fullscreen mode

Step 6: Set up a webhook

await client.webhooks.set({
  url: 'https://yoursite.com/api/whatsapp-webhook',
  enabled: true,
});

const test = await client.webhooks.test();
console.log('Webhook test:', test);
Enter fullscreen mode Exit fullscreen mode

Your endpoint receives JSON payloads for incoming messages, delivery status, and session events — build your bot logic there or use Omdaa AI for automatic replies without an external LLM key.

Step 7 (optional): Omdaa AI bot

Go to Dashboard → Omdaa AI, pick your session, create a bot, and enable Use Omdaa AI. Unlimited AI replies are included in Free Forever.

Next steps

Omdaa API — Free Forever. No paid plans. Start building today.

Top comments (0)