Official client libraries for Node.js, Python, PHP, and Laravel. Full TypeScript support, async operations, and webhook helpers included.
Full TypeScript support, Promise-based API, works with Node.js 18+
npm install @wab2c/sdkAsync/await support, type hints, works with Python 3.9+
pip install wab2cPSR-18 compatible, works with PHP 8.1+
composer require wab2c/sdkimport { WAB2C } from '@wab2c/sdk';
const client = new WAB2C({
apiKey: process.env.WAB2C_API_KEY!,
phoneNumberId: process.env.PHONE_NUMBER_ID!
});
// Send a template message
const response = await client.messages.sendTemplate({
to: '923300003097', // Updated phone number
template: {
name: 'order_confirmation',
language: { code: 'en' },
components: [
{
type: 'body',
parameters: [
{ type: 'text', text: 'ORD-12345' },
{ type: 'currency', currency: { code: 'PKR', amount: 5500 } }
]
}
]
}
});
console.log('Message ID:', response.messageId);