In this tutorial, you'll learn how to add a new phone number and start using WhatsApp directly through the Meta API to use in Cloud Chat.
Step 1: Navigate to the Facebook developers website to create a new app.
Step 2: Assign a name to your app. In this example, we're naming it "WhatsApp task recording."
Step 3: Enter the email address responsible for the app. It should be your own email. In this case, we are adding a Cloud Humans one.
Step 4: Click Next.
Step 5: Select the Other option.
Step 6: Choose Business.
Step 7: Provide the necessary information, including the business portfolio your app belongs to. In this example, we're selecting "Cloud Humans." Then select create app.
Step 8: After creating your app, reenter your password.
Step 9: Select WhatsApp setup and click Start using the API.
Step 10: Scroll down and click Add phone number.
Step 11: Add the display name of the business.
Step 12: Select the timezone / region of your business.
Step 13: Select the Category of your business (we selected "other") and leave the busines description empty (you can change that later).
Step 14: Add the phone number.
Important: Ensure the number you're adding doesn't have a WhatsApp business account associated with it already.
Step 15: Validate your phone number. You'll receive an SMS or a phone call for this.
Importante: if it's a digital number, you won't be able to use SMS.
Go ahead and finish the process.
You've now created a new WhatsApp business account.
Step 16: Now that you've created a new WhatsApp busieness account, you'll need to addd a payment method (card) to it.
Go to the Facebook business billing site and click WhatsApp business accounts.
Step 17: Select the account you just created and want to add the card to to add a payment method.
Now go through the steps of adding a valid credit card.
Step 18: Cick on the 3 dots to the right of the card and mark the added card as default.
Step 19: Return to the Meta developers page, click on Roles, and then Business Manager.
Step 20: Navigate to Users and then System Users.
Step 21: Create a new system user and select the employee option.
Step 22: Select the apps to assign assets to the new system user and give full control.
Step 23: Go to WhatsApp accounts.
Step 24: Assign the new system user to the new WhatsApp account you created earlier and give full WhatsApp business accounts control.
Now you've created a system user and have give it full access to the app and the WhatsApp. Save this because you'll need to come back to this screen soon.
Step 25: Go to your Cloud Chat, navigate to Settings, Inboxes, and Add Inbox.
Step 26: Choose the API provider as WhatsApp Cloud and choose an inbox name.
Step 27: Enter the phone number and phone number ID from the developer's page.
Phone number:
Phone ID
Step 28: Enter the business account ID from the developer's page.
Step 29: Generate a token from the business Facebook settings and paste it into the API key field in Cloud Chat.
Here is where you will com back to systems users and select the system user you've just created.
Click on generate new token and follow the steps
Select the app you've created on the Facebook developer page from the drop down menu.
Select the token expiration as NEVER and select the 2 existing checkboxes from the permissions session with whatsapp on their names:
-
whatsapp_business_management
-
whatsapp_business_messaging
Then click on Generate token
You may need to verify your account here.
Now click on Generate token (blue button).
There will be a long string of characters generated. Copy and past under API Key in Cloud Chat.
Step 30: Click on Create WhatsApp Channel but don't move past this screen yet. You'll need to copy the URL and the new verification token that will show up and paste on the app in the Facebook Developer page.
Step 31: Return to the developer's page and click on WhatsApp configurations.
Step 32: Paste the URL and token into the corresponding fields and click Verify and Save.
Make sure the Attach a client certificate to Webhook requests toggle is turned ON.
Step 33: Scroll down and enable the messages options that appear after saving and turn it ON.
Your setup should now be working, and you should be receiving messages on your Cloud Chat from this WhatsApp.