Send one-time passwords through WhatsApp using the Telnyx Verify API. One request sends the code, one request verifies it. No separate WhatsApp Business API integration required.

A WhatsApp OTP is a one-time password delivered through WhatsApp to confirm a user's identity during signup, login, payment approval, or account recovery. With the Telnyx Verify API, your app sends a WhatsApp OTP with one POST request and checks the submitted code with a second POST request. The API manages the OTP lifecycle across SMS, WhatsApp, and voice. WhatsApp gives verification teams another delivery channel for users who already use it. WhatsApp reports more than 2 billion users in over 180 countries. That reach matters when SMS delivery is uneven or when users expect messages in a branded WhatsApp thread.
The Telnyx Verify API manages three parts of the verification flow. It generates the code, delivers the code, and validates the code when the user submits it. If you are building your first verification flow, start with the OTP guide and the Verify overview.
When you set the verification channel to whatsapp, Telnyx sends the OTP through WhatsApp instead of SMS. Your application keeps the same two-step pattern. Start the verification. Then verify the submitted code.
You do not need a separate WhatsApp Business API integration, custom template management, or a second verification code path. The WhatsApp Business API integration is handled by Telnyx behind the scenes.
Note: WhatsApp OTP works for users who can receive WhatsApp messages. Keep SMS or voice fallback for users without WhatsApp access or for failed delivery paths.
The WhatsApp verification flow has four user-facing steps. Your app requests the code. Telnyx delivers it through WhatsApp. The user enters the code. Your app sends the submitted code back to Telnyx for validation. Verification flow
Your application sends a POST request with the user's phone number, your Verify Profile ID, and type set to whatsapp.
Telnyx generates the OTP and sends it to the user's WhatsApp inbox. You can receive webhook events as the verification moves through the delivery pipeline.
The user enters the OTP in your app, website, or mobile flow. Your app sends that code back to Telnyx. Telnyx returns the verification result.
Use this request to start a WhatsApp verification.
The field that sets the delivery channel is "type": "whatsapp". That tells Telnyx to send the OTP through WhatsApp.
If you wanted to send the same verification over SMS instead, you would use "type": "sms". The rest of the request stays the same.
The verify_profile_id refers to a Verify Profile created in the Telnyx Mission Control Portal. This profile controls settings such as code length, expiration time, and enabled verification channels.
Once the user enters the OTP, send it back to Telnyx using the verification endpoint.
Replace +15551234567 with the phone number used in the original request. Replace 12345 with the code submitted by the user.
A successful response means the code is valid. If the code is incorrect or expired, Telnyx returns an error response. That is the core integration. One request sends the OTP. One request verifies it.
Telnyx can send webhook events to your configured endpoint as the verification progresses. These events help your app show status, store audit logs, and start fallback rules when a message fails or expires.
| Webhook event | Meaning | Use | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
verify.sent | The OTP message was sent | Start a status timer. | ||||||||||||
verify.delivered | WhatsApp confirmed delivery to the user's device | Show delivery state. | ||||||||||||
verify.completed | The user submitted the correct code | Complete the user action. | ||||||||||||
verify.failed | The verification failed, expired, or could not be completed | Trigger retry or fallback rules. | For example, if WhatsApp delivery fails, your application can fall back to SMS without requiring the user to restart the verification process. Plan those rules before launch. The SMS 2FA, 2FA guide, and number verification resources cover common policy choices. ## Choose the right verification channel Use WhatsApp when the user has WhatsApp and expects messages there. Use SMS when reach is the main requirement. Use voice when a text-based path fails or the user needs an audible code. Use the Telnyx SMS API when your verification stack also needs standalone global messaging. It supports 10DLC, toll-free, and shortcodes. Use the Telnyx Voice API when a fallback must call the user. It supports programmable voice with WebSocket support.
| Channel | Best for | Switch field |
|---|---|---|
| Users who expect messages in a branded thread | "type": "whatsapp" | |
| SMS | Maximum reach across all devices | "type": "sms" |
| Voice | Users who cannot receive text-based messages | "type": "voice" |
TELNYX_API_KEY and VERIFY_PROFILE_IDHow is WhatsApp OTP different from SMS OTP?
WhatsApp OTPs arrive in a branded WhatsApp message thread instead of a standard SMS text. Users who already use WhatsApp may find this more familiar. WhatsApp delivery can also be more reliable in markets where SMS delivery rates are uneven.
Do I need a separate WhatsApp Business API integration?
No. Telnyx handles the WhatsApp Business API integration, message formatting, and template management behind the scenes. You send a verification request through the Verify API and Telnyx delivers the code through WhatsApp.
Can I fall back from WhatsApp to SMS?
Yes. If WhatsApp delivery fails, your application can send a new verification request with "type": "sms". The user does not need to restart the verification process. Use webhook events like verify.failed to trigger fallback logic.
What does WhatsApp OTP cost with Telnyx?
Verify API via WhatsApp Messaging costs $0.03 per successful verification plus WhatsApp API pricing. You are charged only for verifications that complete successfully. Check the Verify API product page for current pricing details.
What do I need before sending WhatsApp OTPs?
You need a WhatsApp Business Account (WABA) with an approved authentication template, and a Verify profile configured with WhatsApp as a channel. Create or update your Verify profile in the Mission Control Portal under Identity and Verify.
Start sending WhatsApp OTPs today — Use one API for SMS, WhatsApp, and voice verification. No separate integration required. Get started free
Related articles