.NET WhatsApp API Integration (C# / .NET Core)
Send WhatsApp Business messages from any .NET application — ASP.NET Core, Blazor, MAUI, Worker Services, or Azure Functions — using HttpClient and the Zaptilo API. Built for Indian enterprises and SaaS teams running C# workloads who need pay-as-you-go WhatsApp without paying CPaaS subscription fees.
Why Zaptilo for .NET in India?
- Native HttpClient integration — no extra NuGet packages needed
- Pay-as-you-go INR pricing — from ₹0.04/message at volume
- Works with .NET Framework 4.6.2+, .NET 6/7/8, ASP.NET Core, Blazor, MAUI
- India-based support, GST-compliant invoicing
Step 1: Create the service class
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Threading.Tasks;
public class ZaptiloWhatsAppService
{
private readonly HttpClient _http;
private readonly string _token;
public ZaptiloWhatsAppService(HttpClient http, IConfiguration config)
{
_http = http;
_http.BaseAddress = new Uri("https://web.zaptilo.ai/");
_token = config["Zaptilo:ApiToken"];
_http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _token);
}
public async Task SendTemplateAsync(string phone, string templateName, string[] bodyValues)
{
var parameters = bodyValues.Select(v => new { type = "text", text = v }).ToArray();
var payload = new
{
phone,
template = new
{
name = templateName,
language = new { code = "en" },
components = new[] { new { type = "body", parameters } }
}
};
var response = await _http.PostAsJsonAsync("api/send/template", payload);
response.EnsureSuccessStatusCode();
}
}Step 2: Register and configure
// Program.cs (ASP.NET Core 8)
builder.Services.AddHttpClient<ZaptiloWhatsAppService>();
// appsettings.json
{
"Zaptilo": {
"ApiToken": "your_api_token_here"
}
}Step 3: Send from a controller
[ApiController]
[Route("api/[controller]")]
public class OrdersController : ControllerBase
{
private readonly ZaptiloWhatsAppService _whatsApp;
public OrdersController(ZaptiloWhatsAppService whatsApp) => _whatsApp = whatsApp;
[HttpPost("placed")]
public async Task<IActionResult> OrderPlaced([FromBody] OrderDto order)
{
await _whatsApp.SendTemplateAsync(
"91" + order.CustomerPhone,
"order_confirmation",
new[] { order.CustomerName, order.OrderId }
);
return Ok();
}
}Use cases for Indian .NET teams
ERP order alerts
Trigger from .NET ERP systems on order status change.
Banking/fintech alerts
WhatsApp transaction OTPs and statements from .NET core banking.
Field service updates
Notify customers from a .NET dispatch system.
Government/PSU notifications
Status updates and citizen alerts from .NET portals.
Healthcare appointment reminders
Schedule reminders from your .NET HMS.
Manufacturing alerts
Production line WhatsApp notifications from MES.
Frequently asked questions
How do I send WhatsApp messages from a .NET / C# application?
Create a typed HttpClient service that points to https://web.zaptilo.ai with a Bearer token, register it via builder.Services.AddHttpClient, and call PostAsJsonAsync against /api/send/template. The full code is shown in the steps above.
Does Zaptilo work with .NET 6, .NET 7, .NET 8, and .NET Framework?
Yes. The Zaptilo API is a plain REST API, so it works with .NET Framework 4.6.2+, .NET 6/7/8, ASP.NET Core, Blazor, MAUI, and Worker Services using HttpClient.
How do I store the Zaptilo API token securely in .NET?
Add the token to appsettings.json under a `Zaptilo:ApiToken` key, then bind via IConfiguration. For production, use Azure Key Vault, AWS Secrets Manager, or User Secrets in development.
What is the cost of the .NET WhatsApp Business API for Indian businesses?
Zaptilo charges from ₹0.04 per message at volume, billed in INR with a GST invoice. There is no monthly subscription, no setup fee, and no per-user fee — making it the most cost-effective WhatsApp Business API for Indian .NET teams.
Send WhatsApp from .NET
Free signup. INR pricing. GST invoice. India-based support.
Get Started FreeSee also: Spring Boot · Laravel · Node.js