Zero-Knowledge Verification (v2)
Generate & Send OTP with Challenge Nonce (v2)
POST
Generates a cryptographically random verification code, reserves credits, and issues a 128-bit cryptographic challenge nonce alongside the dispatched SMS or WhatsApp. The nonce is used by client applications to compute a zero-knowledge challenge-response proof, ensuring cleartext codes are never transmitted over HTTP.
header
X-Api-Key<token>SMS Pro API Key (sk_live_... or sk_test_...)
application/json- body
phoneNumber*stringsenderId?stringLength
length <= 11digits?integerDefault
6Value in
468expirySeconds?integerDefault
300template?stringstrategy?stringDefault
"AUTO"Value in
"AUTO""SMS_ONLY""WHATSAPP_FIRST"OTP verification dispatched with challenge nonce
application/json- response
status?stringmessage?stringdata?curl -X POST 'https://api.smspro.com/api/v2/public/otp/send' \ -H 'Content-Type: application/json' \ -d '{ "phoneNumber": "string"}'Example Response
{ "status": "string", "message": "string", "data": { "otpId": "string", "to": "string", "status": "string", "expiresAt": "2019-08-24T14:15:22Z", "resendAfterSeconds": 0, "channel": "string", "challengeNonce": "string", "proofAlgorithm": "string", "proofFormat": "string" }}