# API Setup

  1. Create a new account
    Create a new account at https://developers.facebook.com or log in with your existing account.

  2. Create a new app

    • Create a new app and choose Other as the app type.
    • Select Business.
    • Enter a name for the app and select the Business Account used for WhatsApp.
  3. Configure the Cloud API

    • In Support Desk > Settings > WhatsApp > Cloud API settings > Secret key, enter a random string.
    • Visit https://developers.facebook.com/apps and select your app.
    • Click Add product and add WhatsApp.
    • Navigate to WhatsApp > Configuration, and in Webhook URL, enter the URL from Support Desk > Settings > WhatsApp > Cloud API > Configuration URL.
    • In Verify token, enter the secret key you entered earlier in Support Desk. Click Verify and Save.
    • Click Webhook fields > Manage, and enable the messages Webhook field.
  4. Verify the Integration

    • Visit https://developers.facebook.com and select your app.
    • Click WhatsApp in the left menu, then select API Setup.
    • Copy the Phone number ID and paste it into Support Desk > Settings > WhatsApp > Cloud API numbers > Phone number ID.
    • Enter the desired phone number (e.g., your personal WhatsApp number) in the "To" field and send a test message.
    • Check your WhatsApp account and send a reply, which should appear in Support Desk.
    • To reply from Support Desk, copy the Temporary access token and paste it in Support Desk > Settings > WhatsApp > Cloud API numbers > Token.
  5. Activate WhatsApp Integration for All Numbers

    • In Support Desk > Settings > WhatsApp > Cloud API numbers > Token, enter the permanent access token. Follow these steps to get it:
      1. Visit https://business.facebook.com.
      2. Navigate to Left menu > Settings > Business settings > Users > System Users.
      3. View your admin system user or create a new one.
      4. Assign the app used for WhatsApp API integration with Full control.
      5. Click Generate New Token, enable the following permissions:
        • whatsapp_business_management
        • whatsapp_business_messaging
        • business_management
      6. Set the token expiration to Never, click Generate Token, and save it.
      7. Paste the token into Support Desk > Settings > WhatsApp > Cloud API numbers > Token.
  6. Add Additional Phone Numbers

    • Visit https://developers.facebook.com, select your app, and navigate to Left menu > WhatsApp > API Setup.
    • Click Add phone number at the bottom and follow the instructions.
    • Copy the Phone number ID and paste it into Support Desk > Settings > WhatsApp > Cloud API numbers > Phone number ID.
    • If the number is in pending status, go to Left menu > WhatsApp > API Setup, and click Generate access token.
  7. Important Note
    If you use your current WhatsApp Business number in Support Desk, it will no longer be usable with the WhatsApp Business app. You will need to migrate it following the instructions at:
    Migrate Existing WhatsApp Number.