Verify OTP API
×
Verify OTP API

This ExoVerify API is used to verify if the OTP entered by the user is correct or not

POST

https://exoverify.exotel.com/v2/accounts/{account_sid}/verifications/sms/{verification_id}

Replace {account_sid} with your Account SID (Find it on the top left side of this page)
Replace {verification_id} with the Verification ID as received in the response of the Start Verification API request

The following are the Body Parameters of the API Request

Parameter Name Mandatory/Optional Value / Description
OTP Mandatory The user entered OTP that is to be verified
{
"OTP": "576389"
}
{
  "request_id":"48f97c0f1cca46b09fb0e4255ef8a4eb",
  "method":"POST",
  "http_code":200,
  "response":{
    "code":200,
    "error_data":null,
    "status":"success",
    "data":{
      "verification_id":"12c705bc55de82cc96f9d543cf77167c",
      "application_id":"f5b1c365648e6f50fd1b29633a5e166e",
      "account_sid":"Zomato5",
      "status":"success",
      "created_at":"2022-07-12T12:15:55+05:30",
      "updated_at":"2022-07-12T12:15:55+05:30"
    }
  }
}
{
  "request_id":"34f1bed8b4f246049e894d44d588d911",
  "method":"POST",
  "http_code":403,
  "response":{
    "code":403,
    "error_data":{
      "code":1003,
      "description":"VerificationId already verified.",
      "message":"Authentication failed"
    },
    "status":"failure",
    "data":null
  }
}

The following are a sample list of the HTTP codes and corresponding error codes that can encountered in the event of a failure. 

Http Code

Error Code 

Description

400

1210

OTP has expired

400

1211

Invalid OTP Entered

400

1210

Mandatory Body Parameters missing

401

1010

Authentication failed

403

1017

VerificationId already verified

403

1012

Forbidden Operation

403

1016

Maximum allowed verification attempts has been made

404

1000

Not Found

500

1110

Internal Server Error

500

1120

Internal server error