WhatsApp Business Accounts (WABA)
To send and receive messages from WhatsApp users—and to create and manage templates—you need a WhatsApp Business Account (WABA).
There are two ways to create a WABA in Banricom:
1️⃣ Using Embedded Sign Up 🌟
This is the recommended way—it's faster and easier!
Steps:
✅ Step 1: Login to your Banricom account.
✅ Step 2: In the sidebar, click Account Settings.
✅ Step 3: From the dropdown, select Organizations.
✅ Step 4: Under List of Organizations, click the ✏️ pencil icon next to the organization you want to create a WABA for.
✅ Step 5: Click on the WABA tab.
✅ Step 6: Hit the Embedded Sign Up green button (like WhatsApp's green color!) to begin the process.
2️⃣ Manual Setup 🛠️
If you prefer to handle things manually, just follow the same steps but choose a different button at the end.
Steps:
✅ Step 1: Login to your Banricom account.
✅ Step 2: In the sidebar, click Account Settings.
✅ Step 3: From the dropdown, select Organizations.
✅ Step 4: Under List of Organizations, click the ✏️ pencil icon next to the organization you want to create a WABA for.
✅ Step 5: Click on the WABA tab.
✅ Step 6: Instead of the green button, click the Set Up Manually gray button to start the manual process.
3️⃣ View WABA
After setup, your WhatsApp Business Accounts will appear under the WABA tab for your chosen organization. Click on the WABA name to view the WhatsApp Numbers linked to a WABA.
4️⃣ Fetch All WABA Using API
🔐 Authentication Requirements
All API requests require two authentication headers:
Header | Description | How to Obtain |
---|---|---|
x-api-key | Your application's secret API key | Generated when you create an app |
x-app-id | Your application's unique identifier | Sent to your organization email after app creation |
📌 Important Security Notes:
- Treat your
x-api-key
like a password - never expose it in client-side code - Always make requests to our API over HTTPS
- Rotate your API keys periodically via the developer dashboard
✏️ Request
GET /whatsapp/waba HTTP/1.1
Host: api.banricom.com
x-api-key: your_app_key_here_12345
x-app-id: your_app_id_here_67890
</> Code Example
try {
const response = await fetch("https://api.banricom.com/whatsapp/waba", {
method: "GET",
headers: {
"x-api-key": "YOUR_APP_KEY",
"x-app-id": "YOUR_APP_ID",
},
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
console.log("Success:", data);
} catch (error) {
console.error("Error:", error);
}
✅ Successful Response (200 OK)
{
"success": true,
"data": {
"app_name": "test-app",
"waba": [
{
"wabaId": 225592063964056,
"name": "Infosms"
}
]
}
}
Success Response Fields
Field | Type | Description |
---|---|---|
success | boolean | true indicates successful operation |
data.app_name | string | Your registered application name |
data.waba[] | array | List of WABA accounts |
❌ Error Response
{
"success": false,
"error": {
"code": "BA_001",
"message": "Missing headers: x-api-key or x-app-id"
}
}
Error Response Structure
Field | Type | Description |
---|---|---|
success | boolean | Always false for errors |
error.code | string | Machine-readable error code |
error.message | string | Human-readable error summary |
Common Error Codes
Code | HTTP Status | Description |
---|---|---|
BA_001 | 400 | Missing authentication headers |
BA_002 | 401 | Invalid API credentials |
BA_003 | 403 | Insufficient permissions |
BA_004 | 404 | Resource not found |
BA_005 | 429 | Rate limit exceeded |
BA_500 | 500 | Internal server error |
Troubleshooting
Symptom | Possible Cause | Solution |
---|---|---|
400 Bad Request | Missing headers | Ensure x-api-key and x-app-id are included |
401 Unauthorized | Invalid credentials | Verify your API key and App ID |
403 Forbidden | Permission issues | Check your account permissions |
404 Not Found | Invalid endpoint | Verify the API URL |
429 Too Many Requests | Rate limit exceeded | Implement exponential backoff |
500 Server Error | Service issues | Contact Banricom support |