
Security News
Socket Integrates With Bun 1.3’s Security Scanner API
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
A free and open source .NET NuGet package to facilitate sending OTP messages through WhatsApp Business APIs. This package provides a simple and efficient way to deliver OTP messages, ensuring they reach your users swiftly and securely.
Contact Email - contact@evotechcraft.com
Support mail: support@evotechcraft.com
WhatsApp Api Otp Demo Git Repository - https://github.com/evotechcraft/WhatsApp.Api.Demo
To install the package, use the NuGet Package Manager Console: Install-Package WhatsApp.Api.Otp
Or use the .NET CLI: dotnet add package WhatsApp.Api.Otp
Here's a basic example of how to use the WhatsApp.Api.Otp in your project:
using Microsoft.AspNetCore.Mvc;
using WhatsApp.Api.Otp.Common.Request;
using WhatsApp.Api.Otp.Contracts;
namespace whatsapp_otp_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class WhatsappMessageController : ControllerBase
{
private IWAOtpService _wAOtp;
public WhatsappMessageController(IWAOtpService wAOtp)
{
_wAOtp = wAOtp;
}
[HttpPost("SendOtpMessage")]
public async Task<IActionResult> SendOtpMessage(OtpMessageModel message)
{
var response = await _wAOtp.SendOtpMessageAsync(message);
if (!response.IsSuccess)
{
return BadRequest(response);
}
return Ok(response);
}
}
}
"WhatsAppConfigurations": {
"ApiUrl": "https://graph.facebook.com",
"PhoneNumberId": "{{PhoneNumberId}}",
"AccessToken": "{{AccessToken}}",
"Version": "v20.0"
}
Replace placeholders like "{{PhoneNumberId}}"
and "{{AccessToken}}"
with the appropriate details as necessary.
/// <summary>
/// Adds WhatsApp.Api.Otp dependencies to the service collection.
/// </summary>
/// <param name="service">The service collection.</param>
/// <param name="configuration">The configuration.</param>
/// <param name="configSectionName">The name of the configuration section (optional).</param>
builder.Services.AddWAApiDependency(builder.Configuration, "WhatsAppConfigurations");
public class OtpMessageModel
{
public string TemplateName { get; set; }
public string RecipientNumber { get; set; }
public string Otp { get; set; }
public ETemplateLanguage Language { get; set; }
}
This project is licensed under the MIT License. See the LICENSE file for more details.
If you will face any issues with the usage of this package please raise one so that we can quickly fix it as soon as possible.
This is an open-source project under MIT License
so anyone is welcome to contribute from typos, to source code to documentation.
FAQs
WhatsApp API Otp Package for .NET
We found that whatsapp.api.otp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.