Webitel: Documentation

Create a chat in WhatsApp

  1. Go to https://developers.facebook.com/ and log in.

  2. Click “My Apps” (Fig. 1).

Fig. 1. Home page.png
Fig. 1. Home page
  1. The “Apps” page opens. Click the “Create App” button (Fig. 2).

Fig. 2. Apps page.png
Fig. 2. Apps page
  1. The “Create App” page opens, “Type” section. Select the “Business” app type and click the “Next” button at the bottom of the page (Fig. 3).

Fig. 3. Create App page, Type section.png
Fig. 3. Create App page, Type section
  1. The “Create App” page opens, “Details” section. Fill in the fields. Click the “Create App” button (Fig. 4).

Fig. 4. Create App page, Information section.png
Fig. 4. Create App page, Details section
  1. A modal window opens to re-enter the password. Enter the password and click the “Submit” button. The page for adding products to the app opens. Select WhatsApp, click the “Set Up” button (Fig. 5).

Fig. 5. WhatsApp selection.png
Fig. 5. WhatsApp selection
  1. The “WhatsApp Business Platform API” page opens. Select a business account from the drop-down list. If not selected, a business account will be created automatically. Click the “Next” button (Fig. 6).

Fig. 6. Selecting a business account.png
Fig. 6. Selecting a business account
  1. The “Quick Start” page opens. Click the “Start using API” button (Fig. 7).

Fig. 7. Quick Start page.png
Fig. 7. Quick Start page
  1. The “API Setup” page opens.

  • The temporary access token (Fig. 8) cannot be used.

  • It is intended only for setting up a test number.

  • Registration and connection of your own numbers are described below.

Fig. 8. Temporary access token.png
Fig. 8. Temporary access token
  1. Go to https://business.facebook.com/. After the welcome modals, select the required account and click the “Settings” button in the left panel (Fig. 9).

Fig. 9. Left panel.png
Fig. 9. Left panel
  1. The “Settings” page opens. In the left panel, click “Business Manager” (Fig. 10).

Fig. 10. Settings page.png
Fig. 10. Settings page
  1. Go to the “System Users” page. Click the “Add” button (Fig. 11).

Fig. 11. System Users page.png
Fig. 11. System Users page
  1. Click “Add”. Read and accept the non-discrimination policy on behalf of your system users by clicking the “I Accept” button in the modal window (Fig. 12).

Fig. 12. Non-discrimination policy.png
Fig. 12. Non-discrimination policy
  1. A modal window with acceptance information opens. Click “Done” (Fig. 13).

Fig. 13. Acceptance modal window.png
Fig. 13. Acceptance modal window
  1. The “Create System User” modal window opens (Fig. 14).

  • Enter a name for the new system user, e.g., “webitel”.

  • Select the “Admin” role.

  • Click “Create System User”.

Fig. 14. Create System User modal window.png
Fig. 14. Create System User modal window
  1. The modal window closes and the System Users page opens.
    Now you need to grant access to your app for the new system user.
    Click “Add Assets” (Fig. 15).

Fig. 15. System Users page.png
Fig. 15. System Users page
  1. The “Assign assets to user…” modal window opens.

  • Asset type: “Apps”.

  • Select the connected app.

  • Grant access level: “Manage App”.

  • Click “Save Changes”.

Fig. 16. Assign assets to user.png
Fig. 16. Assign assets to user
  1. A modal window opens with a notification about resource addition (Fig. 17). Click “Done”.

Fig. 17. Resources added.png
Fig. 17. Resources added
  1. The modal closes. On the System Users page, click “Generate New Token” (Fig. 18).

Fig. 18. System Users page.png
Fig. 18. System Users page
  1. The “Generate Token” modal window opens. Select the required app from the drop-down list.

Available permissions appear, select:

  • whatsapp_business_management

  • whatsapp_business_messaging

Click “Generate Token” (Fig. 19).

Fig. 19. Generate token.png
Fig. 19. Generate token
  1. The “Generate Token” modal window opens. Copy the access token for further use in Webitel (Fig. 20).

The generated token must be copied. After closing the window, it will no longer be available for viewing.

This access token allows you to connect/disconnect only those WhatsApp accounts that you grant access to via the app on behalf of your business.

Fig. 20. Generate Token modal window.png
Fig. 20. Generate Token modal window
  1. To integrate with Webitel, you need to create a text gateway of type Meta.

How to create a Meta text gateway can be found here.

If your phone number is currently registered in WhatsApp Messenger or WhatsApp Business, you must first remove it. More information can be found here.

It is recommended to use a phone number that is not registered with other WhatsApp platforms.

  1. Open the WhatsApp tab in the text gateway (Fig. 21). Paste the copied access token (Fig. 20) into the “Token” field. Click “Save”.

Fig. 21. WhatsApp page.png
Fig. 21. WhatsApp page
  1. Go to https://developers.facebook.com/ , open My Apps, select the previously created WhatsApp app by clicking its name. In the left column, select WhatsApp – API Setup (Fig. 22).

Fig. 22. WhatsApp – Get Started.png
Fig. 22. WhatsApp – API Setup
  1. The “API Setup” page opens. Click “Add Phone Number”, located at the bottom of the page (Fig. 23).

Fig. 23. Get Started page.png
Fig. 23. Get Started page
  1. The “Provide information about your company” modal window opens (Fig. 24). Fill in the required fields with your company’s information. Click “Next”.

Fig. 24. Provide company information modal window.png
Fig. 24. Provide company information modal window
  1. The “Create a WhatsApp Business Profile” modal window opens (Fig. 25). Enter the required data, click “Next”.

Fig. 25. Create WhatsApp Business Profile modal window.png
Fig. 25. Create a WhatsApp Business Profile modal window
  1. The “Add WhatsApp Phone Number” modal window opens (Fig. 26). Select the country code and enter the phone number. Choose a verification method. Click “Next”.

Fig. 26. Add WhatsApp Phone Number modal window.png
Fig. 26. Add WhatsApp Phone Number modal window
  1. The “Verify Phone Number” modal window opens. Enter the verification code received via SMS (Fig. 27). After entering the code, the “Next” button becomes active — click it.

Fig. 27. Verify Phone Number modal window.png
Fig. 27. Verify Phone Number modal window
  1. The modal window closes. The “API Setup” page is displayed.

  2. Go to Webitel. Open the “WhatsApp” page in the text gateway (Fig. 21). Click the “Add or remove pages” button. The Facebook login window opens. Log in. The window “Choose the WhatsApp accounts you want App to access modal window” opens (Fig. 28). Select the previously created account. Click “Next”.

Choose whatsapp accounts.png
Fig. 28. Choose the WhatsApp accounts you want App to access modal window
  1. The “Review App’s access request” window opens (Fig. 29). Enable both switches. Click “Done”.

Fig. 29. What is the app allowed to do…?.png
Fig. 29. Review App’s access request
  1. The app linking confirmation window opens (Fig. 30). Click “Got it”.

Fig. 30. App linking confirmation window.png
Fig. 30. App linking confirmation window
  1. The window closes, and the records registry data on the WhatsApp page is updated. The added number is displayed in the registry. Switch the “Enabled” toggle to active. Go to the Chat gateways page, find the gateway where WhatsApp was configured, and switch the “Status” toggle to active.