First Step ( Request missed call )
Request Example
HttpResponse<JsonNode> response = Unirest.get("https://www.cognalys.com/api/v1/otp/?access_token=<YOUR_ACCESS_TOKEN>&app_id=<YOUR_APP_ID>&mobile=<MOBILE_NUMBER_TO_VERIFY>").asJson();
Parameters ( meaning )
YOUR_ACCESS_TOKEN : access token which you get from one of your OTP app
YOUR_APP_ID : app id which you get from one of your OTP app
MOBILE_NUMBER_TO_VERIFY : The mobile number to verify ( should include the country code )
RESPONSE if success
keywords ( meaning )
KEYMATCH_FOR_VERIFYING : This should be requested when you hit the second API ( Second step )
REQUESTED_MOBILE_NUMBER : The mobile number which you requested to verify
STARTING_OF_OTP : The first five digits of the cognalys missed call number
RESPONSE if Failed
keywords ( meaning )
KEYMATCH_FOR_VERIFYING : This should be requested when you hit the second API ( Second step )
ERROR_CODE : if there is any errors occured the status will be failed .And you will get a dictionary of ERROR_CODE along with its message . Error codes are explianed Here
ERROR_MESSAGE : if there is any errors occured the status will be failed. You will get ERROR_MESSAGE as value of ERROR_CODE
Second Step ( Confirm Mobile number )
Request Example
HttpResponse<JsonNode> response = Unirest.get("https://www.cognalys.com/api/v1/otp/confirm/?access_token=<YOUR_ACCESS_TOKEN>&app_id=<YOUR_APP_ID>&otp=<THE_FULL_MISSED_CALL_NUMBER>&keymatch=<THE_KEYMATCH_FROM_FIRST_QUERY>").asJson();
RESPONSE if success
keywords ( meaning )
SUCCESS_MESSAGE : The message when everything went correct
RESPONSE if Failed
keywords ( meaning )
KEYMATCH_FOR_VERIFYING : This should be requested when you hit the second API ( Second step )
ERROR_CODE : if there is any errors occured the status will be failed .And you will get a dictionary of ERROR_CODE along with its message . Error codes are explianed Here
ERROR_MESSAGE : if there is any errors occured the status will be failed. You will get ERROR_MESSAGE as value of ERROR_CODE