Skip to main content
Use this guide when you want OTP.ID to send an outbound WhatsApp message that contains your OTP. You send channel: "whatsapp" to both POST /v3/request and POST /v3/send, and OTP.ID delivers the message to the phone number you provide. WhatsApp OTP works best when you want a familiar chat-based experience. The user receives a WhatsApp message, opens it on their phone, and copies the code into your app. Use an international phone number in digits-only format so OTP.ID can route the message correctly.

How the flow works

1

Create the OTP request

Call POST /v3/request with channel: "whatsapp" when you want OTP.ID to generate the code for you.
2

Or send your own code

Call POST /v3/send with channel: "whatsapp" when your application already has the code.
3

OTP.ID sends a WhatsApp message

OTP.ID delivers the OTP as an outbound WhatsApp message to the destination number you submitted.
4

The user enters the code

Show a clear OTP entry UI in your app and let the user paste or type the code from WhatsApp.
5

You verify the code

Submit the transaction ID and code through the verification flow described in the Verify OTP guide.

Request example

This example uses the canonical request shape in the POST /v3/request API reference.

What your UI should do

  • Use a single OTP input or six separate digit boxes so the user can enter the code quickly.
  • Show a resend action, but only after your own cooldown expires.
  • Show the expiry time clearly so the user knows when the current code stops working.
  • If delivery fails, tell the user to request a new code instead of waiting on the old one.
  • Keep the verification action near the input so the user can finish the flow without leaving the screen.