1. Home
  2. Docs
  3. SMS Messaging
  4. Verifying OTP SMS

Verifying OTP SMS

API URL Endpoint: https://api.geniq.io/rest/v1/verify/{messageId}?code={code}

PARAMETERFORMATREQUIREDDESCRIPTION
messageIdstringYesAn unique Id that was previously returned by our API when sending out OTP SMS
codestringYesThe OTP code that was sent to the recipient
referencestringOptionalAn unique reference ID for keeping track of requests and responses

Sample request using CURL:

$ curl -X POST https://api.geniq.io/rest/v1/verify/84ceac7a-6903-45e5-a2c8-ea3de55b3bc9?code=123456 \
    -H 'Authorization: Basic dXNlcjE6cGFzczE=' \
    -d "reference=12345" 

Parameters returned in the API response:

PARAMETERFORMATDESCRIPTION
referencestringIf reference parameter is submitted during OTP SMS API request, the same value will be returned
responseMessagestringResponse message returned from the API call
responseCodeintegerResponse code returned from the API call. Refer to section “Response Codes” for list of possible values

Sample Response:

{
    "reference":"12345",
    "responseMessage":"Success",
    "responseCode":"0"
}