Two-Factor Verification (OTP)
Verify submitted OTP code
POST
Validates the submitted verification code in constant time against active verification session. Enforces maximum attempt limits and prevents replay attacks. Returns the delivery channel used.
header
X-Api-Key<token>SMS Pro API Key (sk_live_... or sk_test_...)
application/json- body
phoneNumber*stringcode*stringotpId?stringVerification outcome with session resolution
application/json- response
status?stringdata?curl -X POST 'https://api.smspro.com/api/v1/public/otp/verify' \ -H 'Content-Type: application/json' \ -d '{ "phoneNumber": "string", "code": "string"}'Example Response
{ "status": "string", "data": { "valid": true, "status": "APPROVED", "message": "string", "channelDelivered": "WHATSAPP", "verifiedAt": "2019-08-24T14:15:22Z", "attemptsRemaining": 0 }}