WhatsApp Issues
Diagnose and fix WhatsApp messaging issues with AD Unlock.
Messages Not Received by AD Unlock
Check Z-API Status
- Go to Z-API dashboard
- Verify instance shows Connected
- Check webhook configuration
Verify Webhook URL
In Z-API dashboard:
- Webhook URL should match what’s shown in Admin Portal
- Events should include
on-message-received
Test Webhook
In Admin Portal → Settings → WhatsApp:
- Click Test Webhook
- Verify it shows success
Messages Not Sent to Users
Check Z-API Credits
Verify you have message credits in Z-API dashboard.
Test Send
In Admin Portal → Settings → WhatsApp:
- Click Send Test Message
- Enter your phone number
- Click Send
Check Logs
Look for send errors in Admin Portal audit log.
Z-API Disconnected
Symptoms
- Z-API dashboard shows Disconnected
- Messages stop being sent/received
Solutions
-
Rescan QR code:
- In Z-API dashboard, click Reconnect
- On phone, WhatsApp → Linked Devices → Link a Device
- Scan the QR code
-
Check phone:
- Phone must have internet connection
- WhatsApp must be running
- Battery optimization shouldn’t kill WhatsApp
-
Consider dedicated phone:
- Use a dedicated phone for production
- Keep plugged in and on WiFi
Wrong Phone Number Format
Symptoms
- Users not found
- “Phone number not enrolled”
Solution
Use international format without spaces or dashes:
| Wrong | Correct |
|---|---|
11 99999-9999 | +5511999999999 |
(11) 99999-9999 | +5511999999999 |
55 11 99999-9999 | +5511999999999 |
999999999 | +5511999999999 |
Always include:
+sign- Country code (e.g.,
55for Brazil) - Area code
- Number (no spaces or dashes)
Duplicate Messages
Symptoms
- User receives multiple responses
- Actions performed multiple times
Causes and Solutions
| Cause | Solution |
|---|---|
| Webhook called multiple times | Check Z-API webhook retry settings |
| Multiple webhooks configured | Remove duplicate webhooks in Z-API |
| Message processed twice | Check AD Unlock logs for duplicate handling |
Message Delays
Symptoms
- Long delay between user message and response
- OTP takes time to arrive
Solutions
-
Check Z-API latency:
- Z-API dashboard shows message latency
-
Check AD Unlock processing:
- Admin Portal → Requests shows processing time
-
Check connector response time:
- Connector logs show job duration
OTP Not Received (Email)
Note: OTP is sent via email, not WhatsApp.
Check Email Configuration
- Admin Portal → Settings → Email
- Verify email provider settings
- Test email delivery
Check User’s Email
- Verify user has email in AD
- Check spam folder
- Verify email address is correct
Get-ADUser -Identity testuser -Properties mail | Select-Object mailRate Limiting
Symptoms
- “Too many requests” errors
- Messages being blocked
Solutions
- Check Z-API rate limits in dashboard
- Implement message queuing (contact support)
- Consider WhatsApp Business API for higher limits
Quick Diagnostic
# Test Z-API webhook endpoint
$webhookUrl = "https://api.adunlock.me/webhook/zapi" # Replace with your URL
try {
$response = Invoke-WebRequest -Uri $webhookUrl -Method GET -UseBasicParsing
Write-Host "Webhook endpoint reachable: $($response.StatusCode)" -ForegroundColor Green
} catch {
Write-Host "Webhook endpoint error: $_" -ForegroundColor Red
}For Production
Consider upgrading to WhatsApp Business API:
- More reliable (no phone needed)
- Higher rate limits
- Official support
- Contact support@adunlock.me for integration
Last updated on