WhatsApp Business API from Meta

Process to get the WhatsApp Business API directly from Meta

Two get the WhatsApp Business API from Meta, you need to ensure that the following 2 criteria are met;

  1. Facebook Business Manager is verified

  2. You don't have an active WhatsApp account linked with the number

How to get the WhatsApp Business API from Meta?

The process to obtain the WhatsApp Business API from Meta is a bit lengthy and is divided into 4 parts;

  1. Creating an Application on the Meta Developer Portal

  2. Configuring the Phone Number of the Sender

  3. Generating Permanent Token from Meta

  4. Configuring Meta Provider on Swiftsell and setting up the Web-hook URL on Meta

Now let's understand each step in detail;

Creating an Application on the Meta Developer Portal:

To create the application on the Meta Developer Portal, you can follow the following steps;

  1. Go to the website Meta for Developers - https://developers.facebook.com/

  2. Sign in to your account by clicking on 'Log In' & providing your Facebook credentials

  3. After successful login, click on 'My Apps' option in the top right corner

  4. Click on 'Create App'

  5. Choose 'Business' & click on 'Next'

  6. Configure following;

    • App Name: Based on your preference you can provide an appropriate name to the application like test_app, support_app, etc.

    • Contact Email: Provide your email address linked with your Facebook account

    • Business Account: Select the verified business account with which you would like the app to be associated with

  7. Click on 'Create App' to create the app

  8. Under 'Add Products to your App', click on 'Set up' against 'WhatsApp'

Once the app is created for WhatsApp, you will get a temporary token (expires in 23 hours), sender's test number, phone number ID, WhatsApp Business ID & template for testing purpose

Configuring the phone number of the sender:

To link the API & run the bot on your number, you will need to configure your number. You can follow the following steps to configure the same;

  1. Go to 'Getting Started' under 'WhatsApp' on the left panel

  2. Go to 'Step 5: Add a Phone Number' & click on 'Add Phone Number'

  3. Configure the following;

    • Business Name: Provide the name of your business

    • Business Website: Provide the website address of your business

    • Country: Select the country where the business is based in

  4. Click 'Next' to proceed further

  5. Configure the following to set up a WhatsApp Business profile;

    • WhatsApp Business Profile Display Name: That name will appear to the visitors or customers on WhatsApp

    • Timezone: The timezone in which your business will be operating in

    • Category: Choose the category of business from the available options

    • Business Description: Provide a short description of what the business does. This cannot be more than 512 characters and will be displayed to the visitors or customers

  6. Click 'Next' to proceed further

  7. Verify your phone number using the code received and click 'Next' to configure the phone number

Generating Permanent Token:

The next step and most important step is to generate the permanent token for the API configured with the phone number. You can follow the following steps to generate the permanent token;

  1. Go to 'Settings -> Business Settings -> Users -> System Users'

  2. Create a new system user by clicking on 'Add' & configure the following;

    • System Username: Provide appropriate system username as per our preference like developer_test etc..

    • System User Role: Select the role of the system user as 'Admin'

  3. Click on 'Create System User' to create the system user

  4. Once the user is created, click on 'Add Assess' under the newly created system user to assign the assets. You need to follow the following steps to assign the assets;

    • Select 'Apps' as 'Assets Type'

    • Select the newly created 'App' under 'Select Assets'

    • Switch on 'Manage App' under 'Full Control' in 'App'

  5. Click on 'Save Changes' to assign assets to the created user

  6. Go to 'Accounts -> WhatsApp Accounts'

  7. Click on 'Add People' & configure the following;

    • Select the recently created system user under 'Select People'

    • Switch on 'Manage WhatsApp Account' under 'Assign Access'

  8. Click on 'Assign' to save the changes

  9. Go back to 'Users -> System Users'

  10. Select recently created 'System User'

  11. Click on 'Generate New Token' to create a permanent token

  12. Choose your created 'WhatsApp Business App'

  13. Check the following three permissions;

    • Token Type: Permanent

    • Whatsapp_business_management

    • Whatsapp_business_messaging

  14. Click on 'Generate' again to generate the new token

We at Swiftsell recommend having the token copied and saved offline for easy access in the future

Configure Meta provider on Swiftsell & set up webhook URL on Meta:

Once the permanent token is generated, you can follow the following steps to configure the bot on your WhatsApp Number:

  1. Sign in to 'Swiftsell App' - https://app.swiftsell.biz/

  2. Go to 'Channel Configuration -> WhatsApp -> Configuration'

  3. Click on '+ Configuration'

  4. Configure following;

    • Phone Number: Enter the phone number with which the APIs are linked along with the country code however without the '+' sign

    • WhatsApp Business Account ID: Copy the WhatsApp Business Account ID from the App created on the Meta Developer Portal and paste it into the space provided

    • App ID: Copy the App ID from the App created on the Meta Developer Portal and paste it in the space provided

    • Phone Number ID: Copy the Phone Number ID from the App created on the Meta Developer Portal and paste it in the space provided

    • Permanent Token: Copy and paste the permanent token generated for the app into the space provided

  5. Click on 'Save' to save the configuration

  6. Once the configuration is successful, the web-hook URL will be generated by Swiftsell. Copy the 'web-hook' URL

  7. Go back to the App created on the Meta Developer Portal

  8. Go to 'WhatsApp -> Configuration'

  9. Click on 'Edit' against 'Callback URL'

  10. Paste the 'Web-hook URL' generated by Swiftsell along with the 'Permanent Token'

  11. Click on 'Verify & Save'

  12. Click on 'Manage' against 'web-hook fields'

  13. Click on 'Subscribe' against 'Messages'

  14. Click 'Done' to activate the API on WhatsApp

Once you have completed these steps, you should be able to see the bot active on WhatsApp number and able to exchange messages with the bot on WhatsApp

Last updated