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
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Phone number to verify (E.164) |
channel | string | Yes | sms, voice, or whatsapp |
locale | string | No | Language for the OTP message (default: en) |
custom_message | string | No | Custom message template. Use {code} as placeholder |
code_length | integer | No | OTP length: 4–8 digits (default: 6) |
valid_for | integer | No | Expiry in seconds (default: 600) |