Skip to Content
Zero-Knowledge Verification (v2)

Verify Submitted OTP Zero-Knowledge Proof (v2)

View Markdown (.md)
POST
/api/v2/public/otp/verify

Verifies the submitted zero-knowledge codeProof in constant time against the issued challenge nonce and active session. Enforces attempt limits and immediately burns the single-use token on success to prevent replay.

Authorization

headerX-Api-Key<token>

SMS Pro API Key (sk_live_... or sk_test_...)

Request Body

application/json
  1. body
phoneNumber*string
codeProof*string

Zero-Knowledge challenge proof: hex(sha256(challengeNonce.trim().toLowerCase() + ':' + code.trim().toLowerCase()))

otpId?string

Response Body

Verification outcome

application/json
  1. response
status?string
data?
Example Request
curl -X POST 'https://api.smspro.com/api/v2/public/otp/verify' \  -H 'Content-Type: application/json' \  -d '{  "phoneNumber": "string",  "codeProof": "string"}'
Example Response
{  "status": "string",  "data": {    "valid": true,    "status": "APPROVED",    "message": "string",    "channelDelivered": "WHATSAPP",    "verifiedAt": "2019-08-24T14:15:22Z",    "attemptsRemaining": 0  }}