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
messageIdstringYesA 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: Bearer [TOKEN]' \
-d "reference=12345" 

The response from our WhatsApp API will follow a standard format.

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"
}