Skip to main content

How to Set Up WhatsApp Cloud API for Chatbridge Part 2

In the previous article, we configured message receiving. To send messages via WhatsApp Cloud API, you need a WhatsApp API token and a phone number ID.

Generate a Permanent Token

Facebook provides official instructions on how to generate a permanent token. In short:

  1. In the app dashboard, click App Dashboard at the top of the page and choose Business settings. Meta developer account creation flow

  2. In Users, select System Users, then click Add. Meta developer account creation flow

  3. Choose a system user name and role, then click Create system user.

    Meta developer account creation flow

  4. Once the system user appears, click their name to display the asset assignment overlay.

  5. Click Assign assets, select your app, and grant the system user the Manage app permission. Meta developer account creation flow

  6. Click Generate token.

  7. In the token window, select your app, choose a token expiration preference, and assign the following Graph API permissions:

    • business_management
    • whatsapp_business_management
    • whatsapp_business_messaging
  8. Click Generate token and copy the token when it appears.

  9. Paste the token into the WhatsApp API Token field on the plugin settings page and save it.

Meta developer account creation flow

Obtain Phone Number ID

The phone number ID becomes available only after your business is verified and a phone number is added in Meta Business Manager. For testing, you can use the provided test phone number.

  1. Go to the Meta Developer Console, open your app, and choose the first option. Meta developer account creation flow
  2. On the next page, click API Setup. Meta developer account creation flow
  3. On the API Setup page, copy the Phone Number ID. Meta developer account creation flow
  4. Paste the Phone Number ID into the corresponding field on the plugin settings page.

Meta developer account creation flow

Important: To use WhatsApp in production, you must add a phone number and verify your business through Meta Business Manager. The provided test phone number is only suitable for testing and cannot be used in production. Read how to add and verify your phone number in the official Meta docs: https://developers.facebook.com/docs/whatsapp/cloud-api/phone-numbers/

info

Sending messages via WhatsApp is now configured. Continue to Part 3 for final publishing and go-live steps.

Continue to the next article: How to Set Up WhatsApp Cloud API for Chatbridge Part 3.