WhatsApp Business Platform
WhatsApp Business Platform
Resources

WhatsApp Cloud API Get Started

Updated: Oct 1, 2025
This documentation is for developers building on the WhatsApp Business Platform. If you are a WhatsApp user experiencing issues with your personal account, visit the WhatsApp Help Center for support.
This guide helps developers quickly get started with the WhatsApp Cloud API. It covers the basic setup steps, including registering as a developer, creating a Meta app, sending your first message, and setting up a test webhook endpoint. You’ll also learn how to generate secure access tokens and send both template and non-template messages. Advanced features and further resources are introduced for deeper exploration.

Download the Sample App

The Jasper’s Market sample app contains all of the messages and code used in the Jasper’s Market demo. You can use this sample app to learn how to build an application that sends and handles WhatsApp Cloud API data.

Prerequisites

  • Facebook account or managed Meta account
  • Developer registration
  • WhatsApp-enabled device for sending and receiving test messages

Step 1. Create a new Meta app with WhatsApp

  1. Open the Meta App Dashboard to create a new Meta app with the WhatsApp use case.
  2. Click Create App.
  3. Add your app’s name and your email.
  4. Select the Connect with customers through WhatsApp use case and click Next.
  5. Select an existing business portfolio or create a new one.
  6. A list of publishing requirements are listed. You may not have any at this point. Click Next.
  7. Confirm your details, use case, and business portfolio. Click Previous to make changes or Create app to complete app creation.
After creating your app with the WhatsApp use case you are redirected to the Customize use case > Connect on WhatsApp > Quickstart page in the dashboard.

Step 2. Start using the API

  1. Click the Start using the API button to set up the API by adding a phone number and sending your first message. You are redirected to the API Setup page.
  2. In the API Setup section, connect your app to a WhatsApp Business Account. This connection allows your app to access the WhatsApp Cloud API and send messages on behalf of your business. Select an existing WhatsApp Business Account or create a new one:
    • To use an existing account: Select the WhatsApp Business Account from the dropdown menu.
    • To create a new account: Click Create a WhatsApp Business Account and follow the prompts to set up your business profile.
  3. Once connected, you will see your WhatsApp Business Account ID displayed in the API Setup panel.
    • Save this ID for use in API calls.
Note: If you created a new Meta Business Portfolio during app creation, a WhatsApp Business Account may have been automatically created for you. Verify the connection in the API Setup section before proceeding.

Step 3. Send and receive messages

  1. Click Generate access token to generate a temporary access token to send a test message.
  2. Select a From phone number, or add a new one, from the dropdown menu.
  3. Add a To phone number that will receive the test message.
  4. Click the Send message button to send your first message.
    • Make sure to retain both your test phone number ID and WhatsApp Business Account ID for later use.
  5. Once you receive the message you sent, make sure to reply back to keep the conversation going.
The left-side menu lists ways in which you can customize use case settings and permissions to make your app work the way you want it to. You can update these settings at any time.
  • Permissions and features - View required and optional permissions for this use case and add them to an App Review submission, if applicable.
  • Quickstart - Start using the API and learn how to scale your business, improve ROI, and manage your WhatsApp Business account.
  • API Setup - Generate access tokens, send and receive messages, and configure webhooks and the WhatsApp SDK.
  • Configuration - Configure webhooks and the WhatsApp SDK.
  • Resources – View the WhatsApp developer documentation, Meta Blueprint courses, and support resources.
  • Tech Provider onboarding – Start scaling the WhatsApp Business Platform for your business.
  • Partner Solutions – Create a partner solution.
  • Embedded Signup Builder – Integrate Embedded Signup flow into your website or client portal.

Step 4. Set Up the Test Webhook App

You will need to set up a webhook endpoint in order to receive notifications about message statuses, such as read and delivered.
Use our sample webhook server for testing purposes by following the Using a test webhook app guide.
Once your test webhook application is established, respond in the WhatsApp chat thread you created with yourself. You will see the webhook payload in your test application like this:
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "215589313241560883",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "15551797781",
              "phone_number_id": "7794189252778687"
            },
            "contacts": [
              {
                "profile": {
                  "name": "Jessica Laverdetman"
                },
                "wa_id": "13557825698"
              }
            ],
            "messages": [
              {
                "from": "17863559966",
                "id": "wamid.HBgLMTc4NjM1NTk5NjYVAGHAYWYET688aASGNTI1QzZFQjhEMDk2QQA=",
                "timestamp": "1758254144",
                "text": {
                  "body": "Hi!"
                },
                "type": "text"
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}

Step 5. Create a System User and Generate a Permanent Access Token

The temporary access token you created to send the hello_world template message expires quickly and is not suitable for development purposes. So you should create a permanent token for use across the WhatsApp Business Platform.
  1. Navigate to Business Settings and click System users in the sidebar.
  2. Click the Add+ button in the upper-right corner and follow the prompts to create a new system user.
  3. Select the new system user you created, and click Assign Assets.
    • Select your app and toggle Manage app under Full control.
    • Select your WhatsApp account and toggle Manage WhatsApp Business Accounts under Full control.
    • Click the Assign assets button.
  4. Click Generate token.

Step 6. Send a Non-Template Message

When you responded to your earlier test message, you triggered what is known as a customer service window. This 24-hour window allows you to send non-template messages to users on WhatsApp. With the customer service window now open, you can send a non-template message to yourself. To do this, insert your test phone number ID, the system user access token, and your phone number in the code sample below, then paste the code into your terminal and run it.
curl 'https://graph.facebook.com/v23.0/<TEST_BUSINESS_PHONE_NUMBER_ID>/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <SYSTEM_USER_ACCESS_TOKEN>' \
-d '
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<WHATSAPP_USER_PHONE_NUMBER>",
  "type": "text",
  "text": {
    "body": "Hello!"
  }
}'
After successfully sending your message, check your test webhook application to view the webhook event confirming the message receipt.

Step 7. Finish

The WhatsApp Cloud API enables you to send messages and receive webhooks—these are the fundamental building blocks for messaging integration. Beyond these basics, the API offers additional features such as group creation and management, as well as support for calling. To explore these advanced capabilities, check out the “Learn more” section below.

Learn more

Did you find this page helpful?
Thumbs up icon
Thumbs down icon