Configuration Guide: WhatsApp Business API
Step-by-step guide to integrate WhatsApp Business API with Odoo
Prepared by Agilezip for its clients
Verify the phone number is active
Before doing anything else, confirm the number is active and functional with these 3 tests:
- Inbound call: Call the number from another phone — verify it rings and can be answered. If PBX, verify it can be answered without dialing an extension (Meta does not support extensions)
- Outbound call: Make a call from the number — confirm it can make calls. If not, the line may be suspended or deactivated
- Top-up / balance: If it is a prepaid number, verify you can add balance. If the carrier no longer allows top-ups, the number may have been recycled or permanently deactivated
Verify prerequisites
Before continuing, make sure you have:
- Access to the email associated with the Meta / Facebook Business account
- Administrator access to Meta Business Suite
- Access to Meta for Developers with the same account
- The phone number confirmed as active (Step 0.1)
- A credit card to register as payment method on Meta
- Company documents for business verification (business registration, articles of incorporation, or similar)
Back up WhatsApp Business App conversations
If the number currently has WhatsApp Business App, back up conversations. Do not delete the account yet — that will be done in Phase 4 when everything is approved.
- Open WhatsApp Business on the phone
- Go to
- Link Google Drive account if not linked
- Disable Include videos (to reduce size)
- Tap Back up
Verify the backup
Confirm in Google Drive that the backup file was generated correctly. Go to and verify the backup date matches today.
Create an App in Meta for Developers
- Go to Meta for Developers - Apps
- Click Create App
- In "What do you want your app to do?", select Other
- Select app type: Business
- Enter app name (e.g., "MyCompany WhatsApp")
- Select the company's Business Portfolio
- Click Create App
Get App ID and App Secret
- Go to
- Note the App ID (shown in the top bar)
- Click Show next to App Secret and note it
Add WhatsApp product to the App
- In the App Dashboard, go to Add products to your app
- Find WhatsApp and click Set up
- The WhatsApp section will open with the Quick Start screen
Identify the WhatsApp Business Account (WABA) ID
- In the section , locate the WABA ID
- Note the WhatsApp Business Account ID
Business verification
Meta requires verifying the business identity before approving the WhatsApp Business API account:
- Go to Meta Business Suite > Settings > Business security and integrity
- In the Business verification section, click Start verification
- In the selector "Select your verification use case", choose:
"The app requires access to permissions in Meta for Developers" - Follow the process: upload company documents (business registration, articles of incorporation, proof of address, etc.)
- Submit and wait for Meta review (approximately 2 business days)
Add payment method
Meta requires an active payment method for the WhatsApp Business API account:
- Go to Meta Business Suite > Billing and payments
- Add a credit card as payment method
- Verify the card is associated with the WhatsApp Business account
Confirm approval — Green light
Before proceeding to the next phase, verify that all lights are green:
- Go to Meta Business Suite > Settings > WhatsApp Accounts
- Select the WhatsApp Business account
- In the Overview tab, confirm:
Checklist — All must be green to continue
Create a System User in Meta Business Suite
- Go to Meta Business Suite > Settings > System Users
- Click Add
- Name: something descriptive (e.g., "Odoo Integration")
- Role: Admin
- Click Create system user
Assign assets to System User
- Select the newly created System User
- Click Add assets
- In the Apps section, select the App created in Phase 1 and assign Full control
- In the WhatsApp Accounts section, select the WABA and assign Full control
Generate permanent token
- With the System User selected, click Generate token
- Select the App created in Phase 1
- Select permissions:
whatsapp_business_managementwhatsapp_business_messaging
- Click Generate token
- Copy and save the token — it will only be shown once
Delete the WhatsApp Business account
- Open WhatsApp Business on the phone
- Go to
- Enter the phone number and confirm deletion
- Wait 5 to 10 minutes for Meta to process the release
Add phone number in Meta Developer Portal
- In the Meta App, go to
- Click Add phone number
- Enter profile data:
- Display name (name clients will see)
- Business category
- Enter the phone number with country code (+52 for Mexico)
- Select verification method: SMS or Phone call
Verify the number and enter the code
- Receive the verification code via SMS or call
- Enter it in the Meta portal
- Wait for successful verification confirmation
Note the Phone Number ID
- Select the newly registered number in the dropdown
- Note the Phone Number ID below the selector
123456789012345), not the phone number itself.Activate two-step verification
Once the phone number is registered and the API is active (Phase 4), Agilezip activates two-step verification via the Meta Graph API. The client does not need to configure this manually.
Agilezip generates a secure 6-digit PIN, registers it via Graph API, and provides it back to the client for safekeeping.
Content-Type: application/json
Authorization: Bearer {ACCESS_TOKEN}
{ "pin": "XXXXXX" }
Data Handoff to Agilezip
Send the following data securely to Agilezip to configure Odoo:
| Data | Where obtained |
|---|---|
| App ID | Phase 1, Step 1.2 |
| App Secret | Phase 1, Step 1.2 |
| WABA ID | Phase 1, Step 1.4 |
| Phone Number ID | Phase 4, Step 4.4 |
| Access Token (permanent) | Phase 3, Step 3.3 |
Get Webhook data from Odoo
After creating the WhatsApp Business Account in Odoo (Phase 7), obtain:
| Data | Description | Example |
|---|---|---|
| Callback URL | URL where Meta will send events | https://odoo.mycompany.com/whatsapp/webhook/ |
| Verify Token | Random token generated by Odoo | (auto-generated) |
Configure Webhook in Meta Developer Portal
Using the client's System User credentials, configure the webhook in the Meta App:
- In the Meta App, go to
- Enter the Callback URL from Odoo
- Enter the Verify Token from Odoo
- Click Verify and save
POST /{APP_ID}/subscriptions, which is useful for automation.Subscribe to Webhook events
Activate subscription to the following fields:
| Field | Description |
|---|---|
messages | Incoming messages from clients |
account_update | Account status updates |
message_template_status_update | Template approval status changes |
message_template_quality_update | Template quality changes |
message_template_components_update | Template component changes |
Register phone number via Graph API
Before configuring Odoo, the phone number must be formally registered with the WhatsApp Cloud API. This step activates message sending/receiving via the API.
Content-Type: application/json
Authorization: Bearer {ACCESS_TOKEN}
{
"messaging_product": "whatsapp",
"pin": "XXXXXX"
}
Create WhatsApp Business account in Odoo
- Go to
- Click New
Enter integration data
| Odoo Field | Value | Obtained in |
|---|---|---|
| Name | Descriptive name | - |
App ID app_uid | Meta App ID | Phase 1, Step 1.2 |
App Secret app_secret | App Secret | Phase 1, Step 1.2 |
Account ID account_uid | WABA ID | Phase 1, Step 1.4 |
Phone Number ID phone_uid | Registered number ID | Phase 4, Step 4.4 |
Access Token token | Permanent token | Phase 3, Step 3.3 |
Sync message templates
- Click Sync Templates
- Verify approved templates appear in Odoo
Send test message from Odoo
- Go to any contact in Odoo
- Use the Send WhatsApp message option
- Select an approved template and send
Confirm message receipt
The recipient confirms they received the WhatsApp message correctly, with the expected format and content.
Test incoming messages
- Send a message to the company's WhatsApp number from a phone
- Verify it appears in in Odoo
IDs and Credentials Summary
Quick reference of all collected values:
| Data | Where to get it | Obtained by | Used in |
|---|---|---|---|
| App ID | Meta App > Settings > Basic | Client | Odoo (Agilezip) |
| App Secret | Meta App > Settings > Basic | Client | Odoo (Agilezip) |
| WABA ID | Meta App > WhatsApp > API Setup | Client | Odoo (Agilezip) |
| Phone Number ID | Meta App > WhatsApp > API Setup | Client | Odoo (Agilezip) |
| PIN | Generated by Agilezip via Graph API | Agilezip | Graph API Registration + provided to Client |
| Access Token | Meta Business Suite > System Users | Client | Odoo (Agilezip) |
| Callback URL | Odoo > WhatsApp Account | Agilezip | Meta Webhook (Client) |
| Verify Token | Odoo > WhatsApp Account | Agilezip | Meta Webhook (Client) |
Agilezip Technical Reference — Graph API Calls
Internal reference for Agilezip engineers and AI agents executing this integration. All calls use the Meta Graph API v21.0 with the permanent Access Token from Phase 3.
1. Register Phone Number
Activates the phone for WhatsApp Cloud API messaging. Must be called after the number is added and verified in the Meta Developer Portal (Phase 4).
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"messaging_product": "whatsapp",
"pin": "XXXXXX"
}
Expected response: { "success": true }
2. Set / Update Two-Step Verification PIN
Sets or updates the 6-digit PIN independently. Can be called after registration if the PIN needs to be changed.
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{ "pin": "XXXXXX" }
Expected response: { "success": true }
3. Subscribe to Webhooks (API alternative)
Webhook subscription can be done via the Meta Developer Portal UI (Phase 6) or programmatically via Graph API. The API approach is useful for automation.
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"object": "whatsapp_business_account",
"callback_url": "https://odoo.client.com/whatsapp/webhook/",
"verify_token": "{ODOO_VERIFY_TOKEN}",
"fields": "messages"
}
Expected response: { "success": true }
Note: The verify_token is the token generated by Odoo in the WhatsApp Business Account configuration. The callback_url is the Odoo instance's webhook endpoint.
4. Verify Phone Number Status
Check current registration and quality status of the phone number.
Authorization: Bearer {ACCESS_TOKEN}
5. Send Test Message
Quick test to verify the API is working before configuring Odoo. Uses the default hello_world template.
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"messaging_product": "whatsapp",
"to": "521234567890",
"type": "template",
"template": { "name": "hello_world", "language": { "code": "en_US" } }
}
https://developers.facebook.com/docs/whatsapp/cloud-api/reference