How to Setup Your Phone Number in WhatsApp Cloud API?
Step 1: Add your phone number
- Click here to open your WhatsApp Cloud API app’s Get Started page.
- Scroll down on the screen and click on Add phone number button.
- Fill in your business information and click Next.
- On the next screen, you’ll be prompted to create a WhatsApp Business profile. Enter the details and click Next.
- Next, you’ll need to add your phone number to use it as your WhatsApp phone number. Once a phone number is setup here it’ll be connected with WhatsApp Cloud API and you will not be able to use it with the mobile app. Enter your phone number and select a verification method to verify the number.
- Enter the verfication code and click Next.
- Once the phone number is added, scroll up on the Get Started page and select the number you added from the dropdown under Send and receive messages.
- After selecting your phone number, the Phone Number ID and WhatsApp Business Account ID values will get updated below it. Copy those values and keep them aside. We’ll require them later.
Step 2: Configure webhooks
- From the Get Started screen’s left sidebar, click on Whatsapp > Configuration link.
- Click on the Edit button. That’ll open a popup.
- Enter the following in the Callback URL field:
https://app.wanotifier.com/webhooks/eXNRSxOogV3cJF7Fw71A
- In the Verify Token field enter:
wa-notifier
and click Verify. - After this, under Webhook fields, click on the Manage button.
- In the popup that opens, click on the Subscribe button in front of all fields the following fields:
- account_review_update
- account_update
- business_capability_update
- message_template_status_update
- messages
- phone_number_name_update
- phone_number_quality_update
- security
- Click on Done to complete your Webhook setup.
Step 3: Generate permanent access token
- Now let’s create the Permanent Token.
- Scroll to the top of the page and click on App Dashboard next to the MetaforDevelopers logo. Then click on Business Settings.
- On the Business Settings page, in left sidebar, click on System users under Users. Then click on Add to add a new user.
- Click on I Accept button if you see non-discrimation policy popup.
- Enter a name for your System user name (you can keep it
system
). Select System user role as Admin and click on Create system user. - Now click on the Add Assets button. Under Select asset type click on Apps, select your app from Select assets column and then enable Full control > Manage App. Then click on Save Changes.
- Now click on Generate Token button. Select your app from the dropdown and from the list of permissions under Available Permissions: select whatsapp_business_messaging and whatsapp_business_management. Then click on the Generate Token button.
- Copy the Access token.
Step 4: Change App Mode to Live
- Now go back to the app page.
- On the top you’ll see App Mode. Change it from Development to Live.
- Follow the instructions on screen if it asks you to provide additional information like Privacy Policy URL etc.
Now that we’ve generated Phone Number ID, WHatsApp Business Account ID and Permanent Access token, paste them on Settings > API page and click on the Save changes button to complete the setup!