Skip to content

Exequiel65/WhatsAppBussinesApi.Dotnet

Repository files navigation

WhatsAppBussinesApi.Dotnet Package

This NuGet package provides classes and functionalities to integrate the WhatsApp Business API into .NET 8 and higher projects. In this initial version, it supports building message objects and sending them in the following formats:

Text Messages:

  • Text messages
  • Messages with images (supports image/jpeg and image/png)
  • Messages with location
  • Document messages
  • Interactive messages

Templates:

  • Template with text
  • Template with text and header
  • Template with text, header, and buttons

Configuration

  1. Package installation:
dotnet add package WhatsAppBussinesApi.Dotnet
  1. Import the necessary classes into your project:
using WhatsAppBusinessApi.Dotnet;
  1. Add the service in Program.cs:
builder.Services.AddWhatsAppBusinessApi();
  1. Add your credentials in appSettings.json:
    "WhatsAppBusiness": {
        "PhoneNumber": "", // WhatsApp phone number identifier
        "BearerToken": "", // Authentication Bearer Token
        "Version": "" // API version to use
    }
    

Make sure to replace PhoneNumber, BearerToken, and Version with the corresponding values from your WhatsApp Business account.

Example

Example Link

Note:

This package will be continuously updated to include more methods supported by the WhatsApp Business API. In the following days, additional examples and explanations for constructing and utilizing classes will be provided.

Thank you for using WhatsApp Business API .NET Package!

Releases

No releases published

Packages

No packages published

Languages