Skip to content

WhatsApp Cloud API Setup Guide

This guide will walk you through setting up WhatsApp Cloud API step by step. Follow each section carefully to get your WhatsApp business account ready.

What You'll Need Before Starting

  • A verified Facebook Developer account
  • A Meta Business Manager account
  • Access to WhatsApp Business Account

Step 1: Create a Meta Developer Account

  1. Open your web browser and go to: https://developers.facebook.com
  2. You'll see the Meta for Developers homepage. Click on the "Log in with Facebook" button in the top right corner.
  3. If you don't have a developer account yet, click "Create new account" and follow the registration process.

πŸ”— Reference

Screenshot

Step 2: Create Your First App

Once you're logged in, it's time to create an app where WhatsApp will be connected.

  1. Look for "My Apps" in the top navigation menu and click it.
  2. Click the green "Create App" button.
  3. Fill in the following information:
    • App Name: Give your app a name (e.g., "My WhatsApp Business")
    • Contact Email: Enter your email address
  4. In the next step, you'll be asked to select a "Use Case".
    • After entering app details, click "Next" to go to the Use Cases page.
    • You'll see many different use cases. For WhatsApp Cloud API, you MUST select "Connect with customers through WhatsApp."
    • You can filter by "Business messaging" on the left to find it easily.
    • Click the checkbox next to "Connect with customers through WhatsApp" to select it.
    • You'll see "1 use case added" at the bottom. Then click "Next."
  5. You must create a Business Portfolio to activate and use WhatsApp.

πŸ”— Create App Reference | οΏ½ Use Case Reference | πŸ”— Business Portfolio Reference

Step 3: Add WhatsApp to Your App

Great! Now your app is created. The next step is to add WhatsApp functionality to it.

  1. After creating the app, you'll be taken to your App Dashboard.
  2. Scroll down and look for a card/box that says "WhatsApp" with the WhatsApp logo.
  3. Click the "Set up" button on the WhatsApp card.

Screenshot 4. Accept the WhatsApp Terms of Service when prompted.

Screenshot 5. You'll see a confirmation that WhatsApp has been added.

πŸ”— Reference

Step 4: Get Your Access Token

The access token is like a key that allows your app to send WhatsApp messages. Don't worry, getting it is easy!

  1. After setting up WhatsApp, you'll see a menu on the left side. Click on "WhatsApp" to expand it.
  2. Click on "API Setup" under the WhatsApp menu.
  3. You'll see a section called "Temporary access token." This is already generated for you!
  4. Click the "Copy" button next to the token to copy it.

Screenshot

Important

Save this token somewhere safe (like a notepad file). You'll need it later!

Tip

This temporary token lasts for 24 hours. For permanent use, you'll need to generate a system token later.

Step 5: Add Your WhatsApp Number

This is where you'll connect your business phone number to WhatsApp.

Connect Your Phone Number:

  1. In the WhatsApp section of your app, click "Add Phone Number."

Screenshot 2. Fill in your business information (company name, address, etc.)

Screenshot 3. Click "Next." 4. Enter your business mobile phone number. * Important: This number must NOT be linked to any existing WhatsApp account (personal or business). 5. Choose how you want to receive the verification code (SMS or Voice call). 6. Enter the 6-digit verification code when you receive it. 7. Wait for the confirmation message that your phone number is connected.

Step 6: Send Your First Test Message!

This is the exciting partβ€”let's send your first WhatsApp message through the API!

  1. Still on the "API Setup" page, find the "Send and receive messages" section.
  2. Make sure:
    • "From" field shows your test phone number
    • "To" field has your verified phone number selected
  3. Click the blue "Send message" button.
  4. Check your WhatsApp! πŸ“± You should receive a message saying "Hello World" (or a similar test message).

βœ… Success! You've successfully sent a WhatsApp message using the Cloud API!

Step 7: Set Up a Webhook

Webhooks let WhatsApp send notifications to your app when someone messages you or when your messages are delivered/read. This step is optional for testing but important for production apps.

Configuration Steps:

  1. In the left sidebar, click on WhatsApp > Configuration.
  2. Configure Webhook Fields:
    • Callback URL: Enter your HTTPS webhook endpoint URL
    • Verify Token: Enter a secure string (you'll need this in your code)
    • Note: Use your access token.
  3. Subscribe to Webhook Fields:
    • After verification succeeds, you'll see "Webhook fields."
    • Subscribe to the events you want to receive:
      • messages: to receive incoming messages
      • message_status: to see if messages were delivered/read
      • message_template_status_update: Template approval status
    • Click "Subscribe" for each field you need.
    • Click "Verify and Save" to apply changes.

Screenshot

Step 8: Create a Permanent Access Token

This is like a special password that lets Artifism connect to WhatsApp.

  1. Go to business.facebook.com
  2. Navigate to "Business Settings β†’ Users β†’ System Users β†’ Add" to create a new system user.
  3. Give it a name you prefer.
  4. Select "Admin" as the role.
  5. Click "Create System User."

Screenshot 6. After creating the System User, click on the user name and select your app.

Screenshot 7. Grant all the permissions it needs. 8. Select these permissions when asked:

Screenshot * βœ“ WhatsApp Business Management * βœ“ WhatsApp Business Messaging * βœ“ Business Management * βœ“ Pages Messaging 9. Copy the token that appears and save it somewhere safe (you'll need it in the next step).

Screenshot

πŸ”— Reference

Important Things to Know

πŸ”’ Test Mode Limitations

  • You can only send messages to up to 5 verified phone numbers.
  • Your test phone number can only send 250 messages in 24 hours.
  • You can only use pre-approved message templates.

πŸš€ For Production Use (Real Business)

When you're ready to use WhatsApp API for your real business, you'll need to:

  1. Complete Business Verification with Meta.
  2. Add a payment method to your account.
  3. Register your own phone number (not the test one).
  4. Create and submit your message templates for approval.
  5. Get your app reviewed by Meta (if needed).

Helpful Resources