Skip to Content
Setup Guide3. Configure PortalWhatsApp Integration

WhatsApp Integration

⏱️5 minutes

Configure Z-API to enable WhatsApp messaging for AD Unlock.

About Z-API

AD Unlock uses Z-API  to send and receive WhatsApp messages. Z-API provides a simple API to interact with WhatsApp.

Z-API requires a phone with WhatsApp to remain connected. For production, consider WhatsApp Business API for higher reliability.

Steps

1. Create Z-API Account

  1. Go to z-api.io 
  2. Create an account
  3. Create a new instance

2. Get Credentials

From the Z-API dashboard, note:

ValueLocation
Instance IDDashboard → Your Instance
TokenDashboard → Your Instance → Token

3. Connect WhatsApp

  1. In Z-API dashboard, click Connect
  2. A QR code will appear
  3. On your phone, open WhatsApp → Settings → Linked Devices
  4. Scan the QR code
Expected Result

Z-API dashboard shows:

  • Status: Connected
  • Phone number displayed

4. Configure in AD Unlock

  1. In Admin Portal, go to SettingsWhatsApp
  2. Enter:
FieldValue
Instance IDFrom Z-API
TokenFrom Z-API
Webhook URLCopy from AD Unlock

5. Configure Webhook in Z-API

  1. Copy the Webhook URL shown in AD Unlock portal
  2. In Z-API dashboard, go to Webhooks
  3. Configure:
SettingValue
URLThe webhook URL from AD Unlock
Eventson-message-received
  1. Save

6. Verify Integration

Send a test message from AD Unlock:

  1. In Admin Portal, go to SettingsWhatsApp
  2. Click Send Test Message
  3. Enter your phone number
  4. Click Send
Expected Result

You should receive a WhatsApp message:

“This is a test message from AD Unlock. Your integration is working!”

🔧If Something Goes Wrong
SymptomCauseSolution
QR code doesn't scanWhatsApp version issueUpdate WhatsApp to latest version
Disconnected frequentlyPhone going to sleepKeep phone charged and connected to WiFi
Messages not receivedWebhook not configuredVerify webhook URL in Z-API
Test message failsWrong instance ID or tokenVerify credentials match Z-API dashboard

Production Considerations

For production use, consider:

  • Dedicated phone that stays connected 24/7
  • WhatsApp Business API (more reliable, no phone needed)
  • Monitoring for disconnection alerts

Next Step

Last updated on