WhatsPro 1.1.0
dotnet add package WhatsPro --version 1.1.0
NuGet\Install-Package WhatsPro -Version 1.1.0
<PackageReference Include="WhatsPro" Version="1.1.0" />
<PackageVersion Include="WhatsPro" Version="1.1.0" />
<PackageReference Include="WhatsPro" />
paket add WhatsPro --version 1.1.0
#r "nuget: WhatsPro, 1.1.0"
#:package WhatsPro@1.1.0
#addin nuget:?package=WhatsPro&version=1.1.0
#tool nuget:?package=WhatsPro&version=1.1.0
WhatsPro.Net
A non-official .NET SDK library for the Whats-Pro.net REST API.
Features
- Clean and intuitive API
- Strongly Typed Models: Clean C# classes for all request and response structures.
- Robust Authentication: Thread-safe JWT caching and auto-renewal under the hood.
- ASP.NET Core & Dependency Injection: First-class support for
IServiceCollection, Polly resilience, and Health Checks. - Webhooks: Built-in parsers and ASP.NET Core middleware to securely handle incoming webhooks.
- Dashboard API: Fetch live statistics, charts, and top metrics easily.
- Clients & Groups: Fully typed endpoints to manage clients and groups, including Excel imports.
- Sessions & Messages: Connect multiple WhatsApp instances and send messages seamlessly.
- Multi-targeting: Supports both
.NET Standard 2.0and.NET 4.8(Extensions support.NET 8+).
Quick Start (ASP.NET Core)
using WhatsPro.DependencyInjection;
using WhatsPro.AspNetCore;
var builder = WebApplication.CreateBuilder(args);
// 1. Add the SDK (Automatically configures typed HttpClient & Polly resilience)
builder.Services.AddWhatsPro(options =>
{
options.BaseUrl = "https://whats-pro.net/backend/public/index.php/api";
options.Email = "your-email";
options.Password = "your-password";
options.EncryptionKey = "abcd123456789ABCD";
});
// 2. Add your Webhook Handler
builder.Services.AddSingleton<IWhatsProWebhookHandler, MyHandler>();
var app = builder.Build();
// 3. Map Webhooks
app.UseWhatsProWebhooks("/api/webhooks/whatspro");
app.Run();
Full SDK Usage Guide
We provide a comprehensive, tutorial-style usage guide for all modules in the SDK:
- Introduction & Setup
- Authentication
- Dependency Injection (Microsoft.Extensions)
- Webhooks & ASP.NET Core
- Messages
- Clients
- Groups
- Sessions
- Dashboard
Generating and Publishing Documentation
This repository uses DocFX to generate a beautiful, interactive documentation site that includes both our Usage Guides and API Reference.
Local Generation
To build the documentation locally:
- Install DocFX:
dotnet tool update -g docfx - Run DocFX in the repository root:
docfx docfx.json --serve - Navigate to
http://localhost:8080to view the site.
Publishing to GitHub Pages with a Custom Subdomain
We recommend hosting your documentation on GitHub Pages, mapped to your custom subdomain (e.g., docs.yourwebsite.com).
Step 1: Set up a GitHub Action
You can create a GitHub Action (.github/workflows/docs.yml) that runs docfx and pushes the _site output to the gh-pages branch on every push to main.
Step 2: Configure your Custom Domain
- Go to your repository Settings > Pages.
- Under Build and deployment, select "Deploy from a branch" and choose the
gh-pagesbranch. - Under Custom domain, enter your desired subdomain (e.g.,
docs.whatspro.net) and click Save. This will automatically create aCNAMEcommit in yourgh-pagesbranch. - Go to your domain registrar (e.g., GoDaddy, Cloudflare) and create a CNAME record pointing your subdomain (
docs) to<your-github-username>.github.io.
Once DNS propagation completes, your full SDK documentation will be live on your custom domain!
Contributing
Please see CONTRIBUTING.md for details on contributing to the project.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- System.Text.Json (>= 8.0.5)
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on WhatsPro:
| Package | Downloads |
|---|---|
|
WhatsPro.DependencyInjection
Microsoft.Extensions.DependencyInjection integration for WhatsPro.Net. Automatically configures typed HttpClients, resilience policies, and lifecycle management. |
|
|
WhatsPro.AspNetCore
ASP.NET Core integration for WhatsPro.Net. Provides webhook validation, endpoint routing, and seamless dependency injection. |
GitHub repositories
This package is not used by any popular GitHub repositories.
See CHANGELOG.md for full release history.