Skip to content
CloudVNO

Send OTP

Send a one-time passcode to a phone number via SMS, voice call, or WhatsApp.

Send a Verification Code

from cloudvno import Client

client = Client("YOUR_API_KEY")

verification = client.verify.send(
    to="+12125559876",
    channel="sms"  # sms, voice, or whatsapp
)

print(f"Status: {verification.status}")  # pending
print(f"SID: {verification.sid}")
const verification = await client.verify.send({
  to: '+12125559876',
  channel: 'sms',
});
console.log(verification.status); // 'pending'
curl -X POST https://api.cloudvno.com/v1/verify/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d to="+12125559876" \
  -d channel="sms"

Customize the Message

verification = client.verify.send(
    to="+12125559876",
    channel="sms",
    locale="en",
    custom_message="Your MyApp verification code is {code}. Expires in 10 minutes."
)

Send via Voice

Useful as a fallback for users who can't receive SMS:

verification = client.verify.send(
    to="+12125559876",
    channel="voice"  # User receives a call that speaks the code
)

Response

{
  "sid": "VE1a2b3c4d5e6f...",
  "to": "+12125559876",
  "channel": "sms",
  "status": "pending",
  "date_created": "2026-03-06T10:00:00Z",
  "date_updated": "2026-03-06T10:00:00Z"
}

Parameters

ParameterTypeRequiredDescription
tostringYesPhone number to verify (E.164)
channelstringYessms, voice, or whatsapp
localestringNoLanguage for the OTP message (default: en)
custom_messagestringNoCustom message template. Use {code} as placeholder
code_lengthintegerNoOTP length: 4–8 digits (default: 6)
valid_forintegerNoExpiry in seconds (default: 600)