
API Credentials for Whatsapp Business Cloud API
Guide to obtaining tokens, keys, and connections.
Connecting to the WhatsApp Cloud Business API requires several steps in Facebook to obtain four items: an access token, a "Phone Number ID", a "WhatsApp Business Account ID" and a temporary phone number. The temporary number lets you start using the API right away until you replace it with a real WhatsApp number.
Before you continue, we recommend reading the FAQ to understand both the possibilities and the limitations of the official WhatsApp API.
Enable two‑factor authentication
Meta first recommends enabling two‑factor authentication (2FA) on your Facebook account. 2FA adds an extra layer of security alongside your password.
-
1
Go to https://facebook.com
-
2
Click your profile picture in the upper‑right corner.
-
3
Click "Settings & privacy".
-
4
Click "Settings".
-
5
Click "Accounts Center", then "Password and security".
-
6
Click "Two‑factor authentication" and choose the account you want to protect.
-
7
Select the security method you prefer (authenticator app, security key or SMS) and follow the on‑screen instructions.
Register your WhatsApp application
-
1
Go to https://developers.facebook.com
-
2
Click "My Apps".
-
3
Click "Create App".
-
4
In "App Name" enter a name (e.g. "botize").
-
5
Click "Next".
-
6
Under "Add use cases" choose "Other", then click "Next".
-
7
In "Select an app type" choose "Business" and click "Next".
-
8
Click "Create App".
-
9
You will land on "Add products to your app".
Configure the WhatsApp product
-
1
On "Add products to your app" locate the "WhatsApp" block.
-
2
Click "Set Up" in the WhatsApp block.
-
3
You are taken to "WhatsApp Business Platform"; click "Continue".
-
4
Click "API Setup".
Temporary test phone number
WhatsApp now shows a test phone number in the "From" field.<br><br>Use this number for your first tests until you want to connect a real WhatsApp number.<br><br>The test number can only send and receive messages with up to five contacts you specify.<br><br>We will add your personal WhatsApp number as the first test contact:
-
1
Click the "To" dropdown and select "Manage phone number list".
-
2
Enter your phone number and click "Next".
-
3
You will receive an SMS code. Enter it and click "Next". You can repeat these steps for up to four more numbers.
Webhook configuration
-
1
Scroll directly to Step 3 and click "Configure Webhooks".
-
2
In "Callback URL" enter: https://botize.com/callbacks/whatsapp
-
3
In "Verify Token" enter: 10005184KTSJ
-
4
Click "Verify and save".
-
5
A list called "Webhook Fields" appears; locate the field "messages".
-
6
To the right of "messages" toggle the switch from "Not subscribed" to "Subscribed".
Get the Phone Number ID
-
1
In the left‑hand menu click "API Settings".
-
2
Copy the "Phone Number ID" and store it safely.
Get the WhatsApp Business Account ID
-
1
In the left‑hand menu click "API Settings".
-
2
Copy the "WhatsApp Business Account ID" and store it safely.
Create a permanent access token
-
1
Go to http://business.facebook.com/settings
-
2
In the left menu click "System Users".
-
3
Click the "+Â Add" button.
-
4
In "System user name" enter a name, e.g. "botize".
-
5
In "System user role" select "Admin".
-
6
Click "Create system user".
-
7
Click "Add assets".
-
8
Under "Select asset type" choose "Apps".
-
9
Under "Select assets" choose your WhatsApp app.
-
10
Under "Assign permissions" enable "Manage App".
-
11
Click "Save changes".
-
12
In the left menu click "WhatsApp Accounts".
-
13
Select "Test WhatsApp Business Account".
-
14
Click "Add People".
-
15
Choose the user labeled "System User".
-
16
On the right enable "Manage WhatsApp Business Account".
-
17
Click "Assign".
-
18
Return to "System Users" in the left menu.
-
19
Click "Generate token".
-
20
From the list, select your WhatsApp app, then click "Next".
-
21
Choose "Never" for token expiration and click "Next".
-
22
Select the permissions "whatsapp_business_messaging" and "whatsapp_business_management".
-
23
Click "Generate token".
-
24
Copy the generated token and store it in a safe place.
-
25
Click "Done".