Skip to Content
Two-Factor Verification (OTP)

Verify submitted OTP code

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

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.

Authorization

headerX-Api-Key<token>

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

Request Body

application/json
  1. body
phoneNumber*string
code*string
otpId?string

Response Body

Verification outcome with session resolution

application/json
  1. response
status?string
data?
Example Request
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  }}