While setting up WhatsApp Cloud API, many developers encounter the frustrating error:
❌ Webhook Verification Failed
This usually happens due to incorrect verification token handling, invalid HTTPS configuration, or server response issues. This guide shows how to identify and fix the problem quickly.
🚀 What Is WhatsApp Webhook Verification?
When connecting your application to the WhatsApp Cloud API, Meta needs to verify that your webhook URL belongs to you.
Meta sends a verification request containing:
- hub.mode
- hub.challenge
- hub.verify_token
Your server must validate the token and return the challenge value.
If the response is incorrect, Meta shows:
Webhook Verification Failed
⚠️ Most Common Reasons for Webhook Verification Failure
1. Incorrect Verify Token
This is the most common issue.
Example:
Meta Verify Token:
anjok123
Server Verify Token:
anjok321
Since they don't match, verification fails.
Solution
Make sure the token entered in Meta Developer Dashboard is exactly the same as your server code.
2. Not Returning hub.challenge
Meta expects the challenge value back.
Correct behavior:
echo $_GET['hub_challenge'];
If you return anything else, verification will fail.
3. Using HTTP Instead of HTTPS
Meta requires:
✔ HTTPS URL
Example:
https://yourdomain.com/webhook.php
Not:
http://yourdomain.com/webhook.php
4. Server Error (500 Error)
If your PHP script crashes:
500 Internal Server Error
Meta cannot verify your webhook.
Check
- PHP error logs
- Hosting logs
- Apache logs
5. Redirect Issues
Bad:
webhook.php
↓
redirect
↓
another-page.php
Meta may reject redirects.
Use the direct webhook URL.
🔥 Correct PHP Webhook Verification Example
<?php
$verify_token = "anjok123";
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$mode = $_GET['hub_mode'] ?? '';
$token = $_GET['hub_verify_token'] ?? '';
$challenge = $_GET['hub_challenge'] ?? '';
if ($mode === 'subscribe' && $token === $verify_token) {
echo $challenge;
exit;
}
http_response_code(403);
}
🔥 Modern WhatsApp Cloud API Example
Many servers receive:
$_GET['hub.mode']
$_GET['hub.verify_token']
$_GET['hub.challenge']
Example:
$mode = $_GET['hub.mode'] ?? '';
$token = $_GET['hub.verify_token'] ?? '';
$challenge = $_GET['hub.challenge'] ?? '';
Then:
if ($mode === 'subscribe' && $token === $verify_token) {
echo $challenge;
}
🔍 Quick Checklist
Before clicking Verify in Meta:
✅ HTTPS enabled
✅ SSL certificate valid
✅ Verify token matches
✅ Returning challenge value
✅ No redirects
✅ No PHP errors
✅ URL publicly accessible
📱 Example Webhook URL
https://yourdomain.com/webhook.php
Meta must be able to access this URL from the internet.
Localhost URLs will not work:
http://localhost/webhook.php
⚠️ Hosting Problems That Cause Verification Failure
Some shared hosting providers block:
- POST requests
- JSON payloads
- External API access
Check:
✔ PHP version 8+
✔ SSL certificate installed
✔ Firewall rules
🏢 WhatsApp Cloud API Setup Services
Meta Platforms provides the official WhatsApp Cloud API platform.
Anjok Technologies helps businesses with:
✔ WhatsApp Cloud API Setup
✔ Webhook Configuration
✔ CRM Integration
✔ Chatbot Development
✔ WhatsApp Automation
🔧 Testing Your Webhook
Open:
https://yourdomain.com/webhook.php
You should not get:
500 Error
or
404 Not Found
The page must load correctly.
📞 Need Help Fixing Webhook Verification?
📱 +91 80729 70517
🌐 https://www.anjoktechnologies.in/whatsapp-bulk-message-without-api
👉 Message: Webhook Verification Help
🧠 Final Thoughts
Most WhatsApp Webhook Verification errors are caused by:
✔ Incorrect verify token
✔ Missing challenge response
✔ HTTP instead of HTTPS
✔ PHP/server errors
Fixing these issues usually takes less than 5 minutes.
Once verification succeeds, your WhatsApp Cloud API integration can start receiving messages, delivery updates, and webhook events reliably.