Documentation
WhatsApp OTP API for Websites and Mobile Apps
DNZ WhatsApp OTP is built for real verification workflows: account login, password recovery, payment confirmation, and mobile app authentication. The customer creates an OTP account, connects WhatsApp with QR, creates an API key, and sends verification codes from the backend.
Create an API key
Sign in to the WhatsApp OTP dashboard, open the API keys area, and generate a production API key.
Store the full API key only on your server. Do not expose it in browser JavaScript, mobile app code, or public repositories.
Send OTP from your backend
Your application should generate the OTP, store its expiration safely, then send the code through the DNZ API.
Use a stable recipient identifier for each user so logs, limits, and delivery history remain consistent.
await fetch("https://YOUR_ENGINE_URL/api/send-otp", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.DNZ_WHATSAPP_OTP_API_KEY
},
body: JSON.stringify({
recipientId: "user_123",
phone: "+9647878785391",
code: "482913",
purpose: "login"
})
});Best practices
Use short OTP expiration windows, limit retries, and never log raw OTP values in production.
Send only transactional messages requested by the user. Do not use OTP infrastructure for marketing campaigns.
