WhatsappCloudSDK 1.0.0
dotnet add package WhatsappCloudSDK --version 1.0.0
NuGet\Install-Package WhatsappCloudSDK -Version 1.0.0
<PackageReference Include="WhatsappCloudSDK" Version="1.0.0" />
<PackageVersion Include="WhatsappCloudSDK" Version="1.0.0" />
<PackageReference Include="WhatsappCloudSDK" />
paket add WhatsappCloudSDK --version 1.0.0
#r "nuget: WhatsappCloudSDK, 1.0.0"
#:package WhatsappCloudSDK@1.0.0
#addin nuget:?package=WhatsappCloudSDK&version=1.0.0
#tool nuget:?package=WhatsappCloudSDK&version=1.0.0
Getting Started with WhatsApp Cloud API
Introduction
WhatsApp Cloud API, hosted by Meta, is the official WhatsApp Business Platform API used for business messaging. This collection contains common queries, sample responses, and links to supporting documentation that can help you quickly get started with the API.
Cloud API Overview
Cloud API allows medium and large businesses to communicate with customers at scale. Using the API, businesses can build systems that connect thousands of customers with agents or bots, enabling both programmatic and manual communication. Additionally, businesses can integrate the API with numerous backend systems, such as CRM and marketing platforms.
https://developers.facebook.com/docs/whatsapp/cloud-api/overview
Getting Started with Cloud API
To use the API and this collection you must have a Meta business portfolio, a WhatsApp Business Account, and a business phone number. If you complete the steps in the Cloud API Get Started guide, these assets will be created for you.
Get Started as a Solution Partner
This guide goes over the steps Solution Partners need to take in order to offer the Cloud API to their customers.
Migrating from On-Premises API to Cloud API
This guide explains how to migrate business phone numbers from On-Premises API to Cloud API.
Environment
This collection has a corresponding WhatsApp Cloud API Postman environment which you must select when using the collection. Set current values for the variables defined in this environment if you wish to use the collection to perform queries.
You can find most of these values in the WhatsApp Manager or the WhatsApp > Getting Started panel in the app dashboard. However, if you have an access token and your business portfolio ID, you can use queries in the collection to get the remaining values.
Access tokens
The API supports both user and system user access tokens. You can get a user access token by loading your app in the app dashboard and navigating to the WhatsApp > Getting Started panel. Alternatively you can use the Graph API Explorer to generate one.
Since user access tokens expire after 24 hours, you'll likely want to generate a system user access token, which lasts up to 60 days (or permanently, if you wish). See Access Tokens to learn how to create a system user and system user access token.
Once you have your token, save it as a current value in the environment.
Business portfolio ID
You can get your business portfolio ID by signing into the Meta Business Suite. The ID appears in the URL as the business_id
query string parameter value. Once you save this as a current value in the environment, go to the WhatsApp Business Account (WABA) folder and run the Get all owned WABAs query. This will return your WABA ID, which you can save to your environment and then use to determine your business phone number ID.
Permissions
The API only relies on two permissions:
whatsapp_business_management
whatsapp_business_messaging
Note that if you get a user access token from the app dashboard, your app will automatically be granted these permissions (by you, on your behalf), so you can use the token to test right away.
Queries that target your business portfolio require the business_management permission, which you may also need based on your business use case. Most developers do not need this permission, however, as accessing your business portfolio is uncommon, and the Meta Business Suite provides nearly all of this functionality anyway.
Access token debugger
You can paste any token you generate into the access token debugger to see what type of token it is and what permission you have granted to your app.
Pagination
Endpoints that return lists/collections may paginate results (you'll see previous and next properties in the response). Use the URLs from these properties to get the previous or next set of results. Note that if you click one of these links in Postman, it will open a new query in a new tab which you must save before running (otherwise it can't read your environment variables), so you may wish to cut and paste the URL and run the query in the same tab in which it was returned.
Install the Package
If you are building with .NET CLI tools then you can also use the following command:
dotnet add package WhatsappCloudSDK --version 1.0.0
You can also view the package at: https://www.nuget.org/packages/WhatsappCloudSDK/1.0.0
Test the SDK
The generated SDK also contain one or more Tests, which are contained in the Tests project. In order to invoke these test cases, you will need NUnit 3.0 Test Adapter Extension
for Visual Studio. Once the SDK is complied, the test cases should appear in the Test Explorer window. Here, you can click Run All
to execute these test cases.
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
Parameter | Type | Description |
---|---|---|
Version | string |
Default: "DefaultParameterValue" |
Environment | Environment |
The API environment. <br> Default: Environment.Production |
Timeout | TimeSpan |
Http client timeout.<br>Default: TimeSpan.FromSeconds(100) |
HttpClientConfiguration | Action<HttpClientConfiguration.Builder> |
Action delegate that configures the HTTP client by using the HttpClientConfiguration.Builder for customizing API call settings.<br>Default: new HttpClient() |
BearerAuthCredentials | BearerAuthCredentials |
The Credentials Setter for OAuth 2 Bearer token |
The API client can be initialized as follows:
using WhatsAppCloudAPI.Standard;
using WhatsAppCloudAPI.Standard.Authentication;
namespace ConsoleApp;
WhatsAppCloudAPIClient client = new WhatsAppCloudAPIClient.Builder()
.BearerAuthCredentials(
new BearerAuthModel.Builder(
"AccessToken"
)
.Build())
.Environment(WhatsAppCloudAPI.Standard.Environment.Production)
.Version("DefaultParameterValue")
.Build();
Authorization
This API uses the following authentication schemes.
List of APIs
- Get Started
- Whats App Business Accounts WAB As
- Phone Numbers
- Webhook Payload Reference
- Webhook Subscriptions
- Create Flow
- Update Flow
- Setup Endpoint Encryption
- Send Flow
- Get Endpoint Metrics
- Typingindicators
- Business Profiles
- Commerce Settings
- Payments API-SG
- Payments API-IN
- Q Rcodes
- Business Portfolio
- On Prem Account Migration
- Block Users
- Business Compliance
- Registration
- Messages
- Templates
- Media
- Analytics
- Billing
- Examples
SDK Infrastructure
Configuration
HTTP
Utilities
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 was computed. 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. |
-
.NETStandard 2.0
- APIMatic.Core (>= 0.4.10 && < 0.5.0)
- Microsoft.CSharp (>= 4.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0 | 172 | 8/28/2025 |