This guide helps you get started with the WhatsApp Business Platform, and is intended for people developing for themselves or their organization, not on behalf of a client. All developers must follow WhatsApp’s Commerce Policy.
To send and receive a first message using a test number, complete the following steps:
Once you’re ready to use your app for a production use case, check the Next Steps section.
At this time, the platform is not open to those developing on behalf of clients. If you’re developing on behalf of another business, click here.
The WhatsApp Cloud API and WhatsApp Business Management API are part of Meta’s Graph API, so you need to set up a Meta developer account and a Meta developer app. To set that up:
From the App Dashboard, click on the app you would like to connect to WhatsApp. Scroll down to find the "WhatsApp" product and click Set up.
Next, you will see the option to select an existing Business Manager (if you have one) or, if you would like, the onboarding process can create one automatically for you (you can customize your business later, if needed). Make a selection and click Continue.
When you click Continue, the onboarding process performs the following actions:
After that, your browser navigates to the Getting Started tab, where you can learn about and experiment with the WhatsApp Business Platform. The Getting Started tab contains tools and information to help you send test messages. It can be used with test phone numbers and any of your own phone numbers that you register.
In the Getting Started tab:
curl -i -X POST \ https://graph.facebook.com/v12.0/FROM_PHONE_NUMBER_ID/messages \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "messaging_product": "whatsapp", "to": "TO_PHONE_NUMBER", "type": "template", "template": { "name": "hello_world", "language": { "code": "en_US" } } }'
The code sample on the page is formatted for use in Unix-style terminal shells, and is expected to work on MacOS and distributions of Gnu/Linux. If you use Windows, we suggest you perform your first API call using Postman, to avoid platform-related cURL formatting concerns. If you are a Windows 10 user, cURL is available, but requires a different syntax than the one shown in the Getting Started tab to execute in PowerShell or cmd.exe. For more information, see cURL Comes to Windows or cURL for Windows. If you have access to the Windows Subsystem for Linux (WSL), you can also consider launching a Linux distribution and using its terminal.
To get alerted when you receive a message or when a message’s status has changed, you need to set up a Webhooks endpoint for your app. Setting up Webhooks doesn’t affect the status of your phone number and does interfere with you sending or receiving messages.
To get started, first you need to create the endpoint. You can create a custom Webhook URL running on a web server, or use services that help you set up an endpoint, such as Glitch. See Create a Sample App Endpoint for Webhooks Testing for help.
Once your endpoint is ready, go to your App Dashboard.
In your App Dashboard, find the WhatsApp product and click Configuration. Then, find the webhooks section and click Configure a webhook. After the click, a dialog appears on your screen and asks you for two items:
After adding the information, click Verify and Save.
Back in the App Dashboard, click WhatsApp > Configuration in the left-side panel. Under Webhooks, click Manage. A dialog box will open with all the objects you can get notified about. To receive messages from your users, click Subscribe for messages.
Now that your Webhook is set up, send a message to the test number you have used. You should immediately get a Webhooks notification with the content of your message!
When you’re ready to use your app for a production use case, you need to use your own phone number to send messages to your users. When choosing a phone number, consider the following:
You are required to obtain user opt-in before sending proactive business-initiated messages. See Get Opt-In for WhatsApp for more information.
Businesses are charged per conversation, which includes all messages delivered in a 24 hour session. The first 1,000 conversations each month are free. If you want to send more than 1,000 conversations, you need to add a credit card to your account.
To set up a payment method, go to App Dashboard > WhatsApp > Configuration. Under Phone numbers, click Manage phone numbers. This leads you to your Business Manager account, where you can click Add Payment Method to add your credit card.
Credit card billing via Visa or Mastercard is the only available payment method. There are six currencies available for payment: USD, AUD, EUR, GBP, IDR, INR. Currently, payment by credit card is available if you are located in any of the following countries:
Click Here to View Supported Countries |
For more information, see Add a Credit Card to Your WhatsApp Business Platform Account .
To send more business-initiated messages, you need to use message templates. WhatsApp message templates are specific message formats that businesses use to send out notifications or customer care messages to people that have opted in to notifications.
Before sending a message template, you need to create one or you can use one of our pre-approved templates. Check this guide to learn how to send message templates.
Incoming messages are unlimited, but there are limits for outgoing messages. See Messaging Limits for more information on messaging tiers.
Want to learn more?
Explore our library of help content for the WhatsApp Business Platform here.