SDKs and integrations

You can consume Omdaa API directly over HTTP or through official SDKs for different languages and frameworks. This section outlines suggested shapes for SDKs such as omdaa-php, omdaa-node and omdaa-laravel.

Direct JavaScript usage

const response = await fetch("https://omdaa.com/api/v1/messages/send-text", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    sessionId: "your-session-id",
    to: "966xxxxxxxxx",
    message: "Hello from Omdaa API"
  })
});

Node.js library

The official Node.js and TypeScript package is available on npm. Install:

npm install omdaa-api-client

Usage example:

const { OmdaaClient } = require('omdaa-api-client');
const client = new OmdaaClient({ apiKey: 'YOUR_API_KEY' });
const res = await client.messages.sendText({
  sessionId: 'your-session-id',
  to: '966xxxxxxxxx',
  message: 'Hello from Omdaa API'
});

Package on npm → omdaa-api-client

PHP library

Install: composer require omdaa/omdaa-php

$client = new \Omdaa\Api\OmdaaClient("YOUR_API_KEY");
$client->messages()->sendText(["sessionId"=>"default","to"=>"966xxxxxxxxx","message"=>"Hello"]);

Python library

Install: pip install omdaa-api-client

from omdaa import OmdaaClient
client = OmdaaClient("YOUR_API_KEY")
client.messages.send_text({"sessionId":"default","to":"966xxxxxxxxx","message":"Hello"})

Go library

Install: go get github.com/omdaapi/omdaa-go

client := omdaa.NewOmdaaClient("YOUR_API_KEY", "")
client.Messages.SendText(map[string]interface{}{"sessionId":"default","to":"966xxxxxxxxx","message":"Hello"})

Laravel

Install: composer require omdaa/omdaa-laravel then set OMDAA_API_KEY in .env

use Omdaa; Omdaa::messages()->sendText(["sessionId"=>"default","to"=>"966xxxxxxxxx","message"=>"Hello"]);

All SDKs support the same API resources: messages, sessions, webhooks, templates, scheduled, bulk, contacts, groups, chats, and more. npm: omdaa-api-client.