Complete guide to integrating WhatsApp Business API for messaging, verification, and customer engagement.
Base URL: https://api.tayaribykmg.com
Authentication: Bearer token required
Content-Type: application/json
POST /api/whatsapp/messages{
"to": "+1234567890",
"type": "text",
"text": {
"body": "Hello! Welcome to Tayari services."
}
}{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "+1234567890",
"wa_id": "1234567890"
}
],
"messages": [
{
"id": "wamid.xxx"
}
]
}POST /api/whatsapp/messages{
"to": "+1234567890",
"type": "template",
"template": {
"name": "hello_world",
"language": {
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "World"
}
]
}
]
}
}POST /api/whatsapp/messages{
"to": "+1234567890",
"type": "interactive",
"interactive": {
"type": "button",
"body": {
"text": "Choose an option:"
},
"action": {
"buttons": [
{
"type": "reply",
"reply": {
"id": "option_1",
"title": "Option 1"
}
},
{
"type": "reply",
"reply": {
"id": "option_2",
"title": "Option 2"
}
}
]
}
}
}GET /api/whatsapp/messageslimit - Number of messages to retrieve (default: 50)offset - Number of messages to skipfrom_date - Filter messages from date (ISO format)to_date - Filter messages to date (ISO format)POST /api/whatsapp/verify{
"phone_number": "+1234567890",
"verification_code": "123456"
}400Bad Request - Invalid payload or missing required fields401Unauthorized - Invalid or missing authentication token403Forbidden - Insufficient permissions429Rate Limit Exceeded - Too many requests500Internal Server Error - Server-side errornpm install tayari-whatsapp-sdkpip install tayari-whatsappcomposer require tayari/whatsappmaven: tayari-whatsapp-java